001package com.nimbusds.jose;
002
003
004import com.nimbusds.jose.jwk.ECKey;
005import com.nimbusds.jose.util.Base64URL;
006
007
008/**
009 * Read-only view of a {@link JWEHeader JWE header}.
010 *
011 * @author Vladimir Dzhuvinov
012 * @version $version$ (2013-08-20)
013 */
014public interface ReadOnlyJWEHeader extends ReadOnlyCommonSEHeader {
015
016
017        /**
018         * Gets the algorithm ({@code alg}) parameter.
019         *
020         * @return The algorithm parameter.
021         */
022        @Override
023        public JWEAlgorithm getAlgorithm();
024
025
026        /**
027         * Gets the encryption method ({@code enc}) parameter.
028         *
029         * @return The encryption method parameter.
030         */
031        public EncryptionMethod getEncryptionMethod();
032
033
034        /**
035         * Gets the Ephemeral Public Key ({@code epk}) parameter.
036         *
037         * @return The Ephemeral Public Key parameter, {@code null} if not 
038         *         specified.
039         */
040        public ECKey getEphemeralPublicKey();
041
042
043        /**
044         * Gets the compression algorithm ({@code zip}) parameter.
045         *
046         * @return The compression algorithm parameter, {@code null} if not 
047         *         specified.
048         */
049        public CompressionAlgorithm getCompressionAlgorithm();
050
051
052        /**
053         * Gets the agreement PartyUInfo ({@code apu}) parameter.
054         *
055         * @return The agreement PartyUInfo parameter, {@code null} if not
056         *         specified.
057         */
058        public Base64URL getAgreementPartyUInfo();
059        
060        
061        /**
062         * Gets the agreement PartyVInfo ({@code apv}) parameter.
063         * 
064         * @return The agreement PartyVInfo parameter, {@code null} if not
065         *         specified.
066         */
067        public Base64URL getAgreementPartyVInfo();
068
069
070        /**
071         * Gets the PBES2 salt ({@code p2s}) parameter.
072         *
073         * @return The PBES2 salt parameter, {@code null} if not specified.
074         */
075        public Base64URL getPBES2Salt();
076
077
078        /**
079         * Gets the PBES2 count ({@code p2c}) parameter.
080         *
081         * @return The PBES2 count parameter, zero if not specified.
082         */
083        public int getPBES2Count();
084}