Package org.conscrypt
Class GCMParameters
java.lang.Object
java.security.AlgorithmParametersSpi
org.conscrypt.GCMParameters
GCM parameters used during an ciphering operation with
OpenSSLCipher.
This class is used internally for backward compatibility with Android versions
that did not have the GCMParameterSpec class, in addition to being the
implementation of the GCM AlgorithmParameters implementation.
The only supported encoding format is ASN.1, as specified in RFC 5084 section 3.2.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate byte[]Actually the nonce value for the GCM operation.private intThe tag length in bits. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]protected byte[]engineGetEncoded(String format) protected <T extends AlgorithmParameterSpec>
TengineGetParameterSpec(Class<T> aClass) protected voidengineInit(byte[] bytes) protected voidengineInit(byte[] bytes, String format) protected voidengineInit(AlgorithmParameterSpec algorithmParameterSpec) protected String(package private) byte[]getIV()Returns a non-cloned version of the IV.(package private) intgetTLen()Returns the tag length in bits.
-
Field Details
-
DEFAULT_TLEN
private static final int DEFAULT_TLEN- See Also:
-
tLen
private int tLenThe tag length in bits. -
iv
private byte[] ivActually the nonce value for the GCM operation.
-
-
Constructor Details
-
GCMParameters
public GCMParameters() -
GCMParameters
GCMParameters(int tLen, byte[] iv)
-
-
Method Details
-
getTLen
int getTLen()Returns the tag length in bits. -
getIV
byte[] getIV()Returns a non-cloned version of the IV. -
engineInit
protected void engineInit(AlgorithmParameterSpec algorithmParameterSpec) throws InvalidParameterSpecException - Specified by:
engineInitin classAlgorithmParametersSpi- Throws:
InvalidParameterSpecException
-
engineInit
- Specified by:
engineInitin classAlgorithmParametersSpi- Throws:
IOException
-
engineInit
- Specified by:
engineInitin classAlgorithmParametersSpi- Throws:
IOException
-
engineGetParameterSpec
protected <T extends AlgorithmParameterSpec> T engineGetParameterSpec(Class<T> aClass) throws InvalidParameterSpecException - Specified by:
engineGetParameterSpecin classAlgorithmParametersSpi- Throws:
InvalidParameterSpecException
-
engineGetEncoded
- Specified by:
engineGetEncodedin classAlgorithmParametersSpi- Throws:
IOException
-
engineGetEncoded
- Specified by:
engineGetEncodedin classAlgorithmParametersSpi- Throws:
IOException
-
engineToString
- Specified by:
engineToStringin classAlgorithmParametersSpi
-