Class AesGcmFactory
- java.lang.Object
-
- com.google.crypto.tink.aead.subtle.AesGcmFactory
-
- All Implemented Interfaces:
AeadFactory
@Immutable public final class AesGcmFactory extends java.lang.Object implements AeadFactory
AnAeadFactorythat creates new instances of AES-GCM from raw keys
-
-
Constructor Summary
Constructors Constructor Description AesGcmFactory(int keySizeInBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AeadcreateAead(byte[] symmetricKey)Creates a newAead-primitive that uses the key material given insymmetricKey, which must be of lengthAeadFactory.getKeySizeInBytes().intgetKeySizeInBytes()Returns the size of the AEAD key in bytes.
-
-
-
Method Detail
-
getKeySizeInBytes
public int getKeySizeInBytes()
Description copied from interface:AeadFactoryReturns the size of the AEAD key in bytes.- Specified by:
getKeySizeInBytesin interfaceAeadFactory
-
createAead
public Aead createAead(byte[] symmetricKey) throws java.security.GeneralSecurityException
Description copied from interface:AeadFactoryCreates a newAead-primitive that uses the key material given insymmetricKey, which must be of lengthAeadFactory.getKeySizeInBytes().- Specified by:
createAeadin interfaceAeadFactory- Returns:
- the newly created
Aead-primitive. - Throws:
java.security.GeneralSecurityException
-
-