javax.crypto.Mac which uses BoringSSL to perform all the operations.
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class | |
| public static class | |
| public static class | |
| public static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private NativeRef. | |
| private final long | evp_md
Holds the EVP_MD for the hashing algorithm, e.g. EVP_get_digestbyname("sha1"); |
| private byte[] | keyBytes
The secret key used in this keyed MAC. |
| private final byte[] | singleByte
Holds a dummy buffer for writing single bytes to the digest. |
| private final int | size
Holds the output size of the message digest. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected byte[] | engineDoFinal()
Implements abstract javax. |
| protected int | engineGetMacLength()
Implements abstract javax. |
| protected void | engineInit(Key
the (secret) key. key, AlgorithmParameterSpec the algorithm parameters. params)Implements abstract javax. |
| protected void | engineReset()
Implements abstract javax. |
| protected void | engineUpdate(byte
the input byte to be processed. input)Implements abstract javax. |
| protected void | engineUpdate(byte[]
the input buffer. input, int the offset in offset, int input where the input starts.the number of bytes to process. len)Implements abstract javax. len bytes in input,
starting at offset inclusive.
|
| protected void | engineUpdate(ByteBuffer
the ByteBuffer input)Overrides javax. input.remaining() bytes in the ByteBuffer
input, starting at input.position().
|
| private final void |
| ctx | back to summary |
|---|---|
| private NativeRef. | |
| evp_md | back to summary |
|---|---|
| private final long evp_md Holds the EVP_MD for the hashing algorithm, e.g. EVP_get_digestbyname("sha1"); | |
| keyBytes | back to summary |
|---|---|
| private byte[] keyBytes The secret key used in this keyed MAC. | |
| singleByte | back to summary |
|---|---|
| private final byte[] singleByte Holds a dummy buffer for writing single bytes to the digest. | |
| size | back to summary |
|---|---|
| private final int size Holds the output size of the message digest. | |
| OpenSSLMac | back to summary |
|---|---|
| private OpenSSLMac(long evp_md, int size) | |
| engineDoFinal | back to summary |
|---|---|
| protected byte[] engineDoFinal() Implements abstract javax. Doc from javax. Completes the MAC computation and resets the MAC for further use, maintaining the secret key that the MAC was initialized with.
| |
| engineGetMacLength | back to summary |
|---|---|
| protected int engineGetMacLength() Implements abstract javax. Doc from javax. Returns the length of the MAC in bytes.
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException Implements abstract javax. Doc from javax. Initializes the MAC with the given (secret) key and algorithm parameters.
| |
| engineReset | back to summary |
|---|---|
| protected void engineReset() Implements abstract javax. Doc from javax. Resets the MAC for further use, maintaining the secret key that the MAC was initialized with.
| |
| engineUpdate | back to summary |
|---|---|
| protected void engineUpdate(byte input) Implements abstract javax. Doc from javax. Processes the given byte.
| |
| engineUpdate | back to summary |
|---|---|
| protected void engineUpdate(byte[] input, int offset, int len) Implements abstract javax. Doc from javax. Processes the first
| |
| engineUpdate | back to summary |
|---|---|
| protected void engineUpdate(ByteBuffer input) Overrides javax. Doc from javax. Processes Subclasses should consider overriding this method if they can process ByteBuffers more efficiently than byte arrays.
| |
| resetContext | back to summary |
|---|---|
| private final void resetContext() | |
| Access | Constructor and Description |
|---|---|
| public |
| HmacMD5 | back to summary |
|---|---|
| public HmacMD5() | |
| Access | Constructor and Description |
|---|---|
| public |
| HmacSHA1 | back to summary |
|---|---|
| public HmacSHA1() | |
| Access | Constructor and Description |
|---|---|
| public |
| HmacSHA224 | back to summary |
|---|---|
| public HmacSHA224() throws NoSuchAlgorithmException | |
| Access | Constructor and Description |
|---|---|
| public |
| HmacSHA256 | back to summary |
|---|---|
| public HmacSHA256() throws NoSuchAlgorithmException | |
| Access | Constructor and Description |
|---|---|
| public |
| HmacSHA384 | back to summary |
|---|---|
| public HmacSHA384() throws NoSuchAlgorithmException | |
| Access | Constructor and Description |
|---|---|
| public |
| HmacSHA512 | back to summary |
|---|---|
| public HmacSHA512() | |