Package com.wolfssl.wolfcrypt
Class Sha
java.lang.Object
com.wolfssl.wolfcrypt.WolfObject
com.wolfssl.wolfcrypt.NativeStruct
com.wolfssl.wolfcrypt.MessageDigest
com.wolfssl.wolfcrypt.Sha
public class Sha extends MessageDigest
Wrapper for the native WolfCrypt Sha implementation.
- Version:
- 2.0, March 2017
- Author:
- Moisés Guimarães
-
Field Summary
Fields Modifier and Type Field Description static intDIGEST_SIZEstatic intTYPE -
Constructor Summary
-
Method Summary
Modifier and Type Method Description intdigestSize()protected longmallocNativeStruct()protected voidnative_final(byte[] hash)protected voidnative_final(java.nio.ByteBuffer hash, int offset)protected voidnative_init()protected voidnative_update(byte[] data, int offset, int len)protected voidnative_update(java.nio.ByteBuffer data, int offset, int len)Methods inherited from class com.wolfssl.wolfcrypt.MessageDigest
digest, digest, digest, init, releaseNativeStruct, update, update, update, update, updateMethods inherited from class com.wolfssl.wolfcrypt.NativeStruct
finalize, getNativeStruct, setNativeStruct
-
Field Details
-
TYPE
public static final int TYPE- See Also:
- Constant Field Values
-
DIGEST_SIZE
public static final int DIGEST_SIZE- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
mallocNativeStruct
protected long mallocNativeStruct() throws java.lang.OutOfMemoryError- Specified by:
mallocNativeStructin classNativeStruct- Throws:
java.lang.OutOfMemoryError
-
native_init
protected void native_init()- Specified by:
native_initin classMessageDigest
-
native_update
protected void native_update(java.nio.ByteBuffer data, int offset, int len)- Specified by:
native_updatein classMessageDigest
-
native_update
protected void native_update(byte[] data, int offset, int len)- Specified by:
native_updatein classMessageDigest
-
native_final
protected void native_final(java.nio.ByteBuffer hash, int offset)- Specified by:
native_finalin classMessageDigest
-
native_final
protected void native_final(byte[] hash)- Specified by:
native_finalin classMessageDigest
-
digestSize
public int digestSize()- Specified by:
digestSizein classMessageDigest
-