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 int
private byte[]
Actually the nonce value for the GCM operation.private int
The 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 void
engineInit
(byte[] bytes) protected void
engineInit
(byte[] bytes, String format) protected void
engineInit
(AlgorithmParameterSpec algorithmParameterSpec) protected String
(package private) byte[]
getIV()
Returns a non-cloned version of the IV.(package private) int
getTLen()
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:
engineInit
in classAlgorithmParametersSpi
- Throws:
InvalidParameterSpecException
-
engineInit
- Specified by:
engineInit
in classAlgorithmParametersSpi
- Throws:
IOException
-
engineInit
- Specified by:
engineInit
in classAlgorithmParametersSpi
- Throws:
IOException
-
engineGetParameterSpec
protected <T extends AlgorithmParameterSpec> T engineGetParameterSpec(Class<T> aClass) throws InvalidParameterSpecException - Specified by:
engineGetParameterSpec
in classAlgorithmParametersSpi
- Throws:
InvalidParameterSpecException
-
engineGetEncoded
- Specified by:
engineGetEncoded
in classAlgorithmParametersSpi
- Throws:
IOException
-
engineGetEncoded
- Specified by:
engineGetEncoded
in classAlgorithmParametersSpi
- Throws:
IOException
-
engineToString
- Specified by:
engineToString
in classAlgorithmParametersSpi
-