Package com.wolfssl.wolfcrypt
Class Hmac
java.lang.Object
com.wolfssl.wolfcrypt.WolfObject
com.wolfssl.wolfcrypt.NativeStruct
com.wolfssl.wolfcrypt.Hmac
public class Hmac extends NativeStruct
Wrapper for the native WolfCrypt Hmac implementation.
- Version:
- 2.0, March 2017
- Author:
- Moisés Guimarães
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description byte[]
doFinal()
byte[]
doFinal(byte[] data)
java.lang.String
getAlgorithm()
int
getMacLength()
protected long
mallocNativeStruct()
void
reset()
void
setKey(int type, byte[] key)
void
update(byte data)
void
update(byte[] data)
void
update(byte[] data, int offset, int length)
void
update(java.nio.ByteBuffer data)
Methods inherited from class com.wolfssl.wolfcrypt.NativeStruct
finalize, getNativeStruct, releaseNativeStruct, setNativeStruct
-
Field Details
-
Constructor Details
-
Method Details
-
mallocNativeStruct
protected long mallocNativeStruct() throws java.lang.OutOfMemoryError- Specified by:
mallocNativeStruct
in classNativeStruct
- Throws:
java.lang.OutOfMemoryError
-
setKey
public void setKey(int type, byte[] key) -
reset
public void reset() -
update
public void update(byte data) -
update
public void update(byte[] data) -
update
public void update(byte[] data, int offset, int length) -
update
public void update(java.nio.ByteBuffer data) -
doFinal
public byte[] doFinal() -
doFinal
public byte[] doFinal(byte[] data) -
getAlgorithm
public java.lang.String getAlgorithm() -
getMacLength
public int getMacLength()
-