Class NativeMessageDigestSpi
- java.lang.Object
-
- com.microej.crypto.internal.digest.NativeMessageDigestSpi
-
public class NativeMessageDigestSpi extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NativeMessageDigestSpi()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidnativeClose(int nativeAlgorithmId, int nativeId)static voidnativeDigest(int nativeAlgorithmId, int nativeId, byte[] out, int offset, int length)static intnativeGetAlgorithmDescription(byte[] algorithmBytes, byte[] description)Gets for the given algorithm the message digest description.static intnativeGetCloseId(int nativeAlgorithmId)Gets the id of the native close function.static intnativeInit(int nativeAlgorithmId)Returns a nativeId.static voidnativeUpdate(int nativeAlgorithmId, int nativeId, byte[] buffer, int offset, int length)
-
-
-
Method Detail
-
nativeGetAlgorithmDescription
public static int nativeGetAlgorithmDescription(byte[] algorithmBytes, byte[] description)Gets for the given algorithm the message digest description.descriptionmust be filled-in with:- [0-3]: digestLength: length of the message digest in bytes
- Parameters:
algorithmBytes- Null terminated string that describes the algorithmdescription- the output buffer to fill in (see above).- Returns:
- algorithm ID on success or -1 on error.
-
nativeInit
public static int nativeInit(int nativeAlgorithmId) throws ej.sni.NativeExceptionReturns a nativeId.- Throws:
ej.sni.NativeException- on error
-
nativeClose
public static void nativeClose(int nativeAlgorithmId, int nativeId) throws ej.sni.NativeException, java.lang.IllegalArgumentException, java.io.IOException- Parameters:
nativeAlgorithmId-nativeId-- Throws:
java.io.IOExceptionjava.lang.IllegalArgumentExceptionej.sni.NativeException- on error
-
nativeUpdate
public static void nativeUpdate(int nativeAlgorithmId, int nativeId, byte[] buffer, int offset, int length) throws ej.sni.NativeException- Parameters:
nativeAlgorithmId-nativeId-- Throws:
ej.sni.NativeException- on error
-
nativeDigest
public static void nativeDigest(int nativeAlgorithmId, int nativeId, byte[] out, int offset, int length) throws ej.sni.NativeException- Parameters:
nativeAlgorithmId-nativeId-- Throws:
ej.sni.NativeException- on error
-
nativeGetCloseId
public static int nativeGetCloseId(int nativeAlgorithmId) throws ej.sni.NativeExceptionGets the id of the native close function.- Returns:
- the id of the static native close function
- Throws:
ej.sni.NativeException
-
-