Class AesGcmJceUtil
- java.lang.Object
-
- com.google.crypto.tink.aead.internal.AesGcmJceUtil
-
public final class AesGcmJceUtil extends java.lang.ObjectHelper functions for AES-GCM using JCE.
-
-
Field Summary
Fields Modifier and Type Field Description static intIV_SIZE_IN_BYTESstatic intTAG_SIZE_IN_BYTES
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.security.spec.AlgorithmParameterSpecgetParams(byte[] iv)static java.security.spec.AlgorithmParameterSpecgetParams(byte[] buf, int offset, int len)static javax.crypto.SecretKeygetSecretKey(byte[] key)static javax.crypto.CiphergetThreadLocalCipher()Returns a thread-local instance of the AES-GCM cipher.
-
-
-
Field Detail
-
IV_SIZE_IN_BYTES
public static final int IV_SIZE_IN_BYTES
- See Also:
- Constant Field Values
-
TAG_SIZE_IN_BYTES
public static final int TAG_SIZE_IN_BYTES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getThreadLocalCipher
public static javax.crypto.Cipher getThreadLocalCipher()
Returns a thread-local instance of the AES-GCM cipher.
-
getSecretKey
public static javax.crypto.SecretKey getSecretKey(byte[] key) throws java.security.GeneralSecurityException- Throws:
java.security.GeneralSecurityException
-
getParams
public static java.security.spec.AlgorithmParameterSpec getParams(byte[] iv)
-
getParams
public static java.security.spec.AlgorithmParameterSpec getParams(byte[] buf, int offset, int len)
-
-