Package org.conscrypt
Class OpenSSLMac.Hmac
- java.lang.Object
-
- javax.crypto.MacSpi
-
- org.conscrypt.OpenSSLMac
-
- org.conscrypt.OpenSSLMac.Hmac
-
- Direct Known Subclasses:
OpenSSLMac.HmacMD5,OpenSSLMac.HmacSHA1,OpenSSLMac.HmacSHA224,OpenSSLMac.HmacSHA256,OpenSSLMac.HmacSHA384,OpenSSLMac.HmacSHA512
- Enclosing class:
- OpenSSLMac
public static class OpenSSLMac.Hmac extends OpenSSLMac
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.conscrypt.OpenSSLMac
OpenSSLMac.AesCmac, OpenSSLMac.Hmac, OpenSSLMac.HmacMD5, OpenSSLMac.HmacSHA1, OpenSSLMac.HmacSHA224, OpenSSLMac.HmacSHA256, OpenSSLMac.HmacSHA384, OpenSSLMac.HmacSHA512
-
-
Field Summary
Fields Modifier and Type Field Description private NativeRef.HMAC_CTXctxprivate longevpMdHolds the EVP_MD for the hashing algorithm, e.g.-
Fields inherited from class org.conscrypt.OpenSSLMac
initialized
-
-
Constructor Summary
Constructors Constructor Description Hmac(long evpMd, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]doFinal()protected voidengineUpdate(byte[] input, int offset, int len)protected voidinitContext(byte[] keyBytes)Creates and initializes the relevant BoringSSL *MAC context.protected voidresetContext()Resets the context for a new operation with the same key.protected voidupdateDirect(long ptr, int len)Passes the contents of a direct ByteBuffer to the relevant BoringSSL *MAC function.-
Methods inherited from class org.conscrypt.OpenSSLMac
engineDoFinal, engineGetMacLength, engineInit, engineReset, engineUpdate, engineUpdate
-
-
-
-
Field Detail
-
ctx
private NativeRef.HMAC_CTX ctx
-
evpMd
private final long evpMd
Holds the EVP_MD for the hashing algorithm, e.g. EVP_get_digestbyname("sha1");
-
-
Method Detail
-
initContext
protected void initContext(byte[] keyBytes)
Description copied from class:OpenSSLMacCreates and initializes the relevant BoringSSL *MAC context.- Specified by:
initContextin classOpenSSLMac
-
resetContext
protected void resetContext()
Description copied from class:OpenSSLMacResets the context for a new operation with the same key.- Specified by:
resetContextin classOpenSSLMac
-
engineUpdate
protected void engineUpdate(byte[] input, int offset, int len)- Specified by:
engineUpdatein classjavax.crypto.MacSpi
-
updateDirect
protected void updateDirect(long ptr, int len)Description copied from class:OpenSSLMacPasses the contents of a direct ByteBuffer to the relevant BoringSSL *MAC function.- Specified by:
updateDirectin classOpenSSLMac
-
doFinal
protected byte[] doFinal()
- Specified by:
doFinalin classOpenSSLMac
-
-