@Immutable public final class AesGcmFactory extends Object implements AeadFactory
AeadFactory that creates new instances of AES-GCM from raw keys| Constructor and Description |
|---|
AesGcmFactory(int keySizeInBytes) |
| Modifier and Type | Method and Description |
|---|---|
Aead |
createAead(byte[] symmetricKey)
Creates a new
Aead-primitive that uses the key material given in symmetricKey,
which must be of length AeadFactory.getKeySizeInBytes(). |
int |
getKeySizeInBytes()
Returns the size of the AEAD key in bytes.
|
public AesGcmFactory(int keySizeInBytes)
throws GeneralSecurityException
GeneralSecurityExceptionpublic int getKeySizeInBytes()
AeadFactorygetKeySizeInBytes in interface AeadFactorypublic Aead createAead(byte[] symmetricKey) throws GeneralSecurityException
AeadFactoryAead-primitive that uses the key material given in symmetricKey,
which must be of length AeadFactory.getKeySizeInBytes().createAead in interface AeadFactoryAead-primitive.GeneralSecurityException