H(K + opad, H(K + ipad, text))
| Modifier and Type | Field and Description |
|---|---|
| private Digest | |
| private static final byte[] | |
| private static final byte | |
| private static final byte[] | |
| private static final byte | |
| private int | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| pack-priv | BcSSL3HMAC(Digest
the digest. digest)Base constructor for one of the standard digest algorithms for which the byteLength is known. |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | calculateMAC()
Implements org. Return calculated MAC for any input passed in. |
| public void | calculateMAC(byte[]
output array to write the MAC to. output, int offset into the output array to write the MAC to. outOff)Implements org. Write the calculated MAC to an output buffer. |
| private void | |
| private static byte[] | |
| public int | getInternalBlockSize()
Implements org. Return the internal block size for the message digest underlying this HMAC service. |
| public int | getMacLength()
Implements org. Return the length of the MAC generated by this service. |
| public void | |
| public void | setKey(byte[]
array holding the MAC key. key, int offset into the array the key starts at. keyOff, int length of the key in the array. keyLen)Implements org. Set the key to be used by the MAC implementation supporting this service. |
| public void | update(byte[]
input array containing the data. in, int offset into the input array the input starts at. inOff, int the length of the input data. len)Implements org. Update the MAC with the passed in input. |
| digest | back to summary |
|---|---|
| private Digest digest | |
| IPAD | back to summary |
|---|---|
| private static final byte[] IPAD | |
| IPAD_BYTE | back to summary |
|---|---|
| private static final byte IPAD_BYTE | |
| OPAD | back to summary |
|---|---|
| private static final byte[] OPAD | |
| OPAD_BYTE | back to summary |
|---|---|
| private static final byte OPAD_BYTE | |
| padLength | back to summary |
|---|---|
| private int padLength | |
| secret | back to summary |
|---|---|
| private byte[] secret | |
| BcSSL3HMAC | back to summary |
|---|---|
| pack-priv BcSSL3HMAC(Digest digest) Base constructor for one of the standard digest algorithms for which the byteLength is known. Behaviour is undefined for digests other than MD5 or SHA1.
| |
| calculateMAC | back to summary |
|---|---|
| public byte[] calculateMAC() Implements org. Doc from org. Return calculated MAC for any input passed in.
| |
| calculateMAC | back to summary |
|---|---|
| public void calculateMAC(byte[] output, int outOff) Implements org. Doc from org. Write the calculated MAC to an output buffer.
| |
| doFinal | back to summary |
|---|---|
| private void doFinal(byte[] out, int outOff) | |
| genPad | back to summary |
|---|---|
| private static byte[] genPad(byte b, int count) | |
| getInternalBlockSize | back to summary |
|---|---|
| public int getInternalBlockSize() Implements org. Doc from org. Return the internal block size for the message digest underlying this HMAC service.
| |
| getMacLength | back to summary |
|---|---|
| public int getMacLength() Implements org. Doc from org. Return the length of the MAC generated by this service.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Reset the mac generator. | |
| setKey | back to summary |
|---|---|
| public void setKey(byte[] key, int keyOff, int keyLen) Implements org. Doc from org. Set the key to be used by the MAC implementation supporting this service.
| |
| update | back to summary |
|---|---|
| public void update(byte[] in, int inOff, int len) Implements org. Doc from org. Update the MAC with the passed in input.
| |