Class NativeCipherSpi
- java.lang.Object
-
- com.microej.crypto.internal.cipher.NativeCipherSpi
-
public class NativeCipherSpi extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NativeCipherSpi()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidnativeClose(int nativeTransformationId, int nativeId)static intnativeDecrypt(int nativeTransformationId, int nativeId, byte[] buffer, int i, int len, byte[] output, int outputOffset, boolean doFinal)static intnativeEncrypt(int nativeTransformationId, int nativeId, byte[] buffer, int i, int len, byte[] output, int outputOffset, boolean doFinal)static intnativeGetBufferedLength(int nativeTransformationId, int nativeId)static intnativeGetCloseId(int nativeTransformationId)Gets the id of the native close function.static voidnativeGetIV(int nativeTransformationId, int nativeId, byte[] iv, int ivLength)static intnativeGetIVLength(int nativeTransformationId, int nativeId)Return -1 if no IV, otherwise returns the length of the IV.static intnativeGetTransformationDescription(byte[] transformationBytes, byte[] description)static intnativeInit(int nativeTransformationId, boolean decrypting, int nativeKeyId, byte[] ivBytes, int ivLength, int tagLength)Throw NativeException on error.static voidnativeSetIV(int nativeTransformationId, int nativeId, byte[] iv, int ivLength)static voidnativeUpdateAAD(int nativeTransformationId, int nativeId, byte[] src, int offset, int len)
-
-
-
Method Detail
-
nativeGetTransformationDescription
public static int nativeGetTransformationDescription(byte[] transformationBytes, byte[] description)
-
nativeGetBufferedLength
public static int nativeGetBufferedLength(int nativeTransformationId, int nativeId)
-
nativeGetIV
public static void nativeGetIV(int nativeTransformationId, int nativeId, byte[] iv, int ivLength)
-
nativeSetIV
public static void nativeSetIV(int nativeTransformationId, int nativeId, byte[] iv, int ivLength)
-
nativeUpdateAAD
public static void nativeUpdateAAD(int nativeTransformationId, int nativeId, byte[] src, int offset, int len)
-
nativeGetIVLength
public static int nativeGetIVLength(int nativeTransformationId, int nativeId)Return -1 if no IV, otherwise returns the length of the IV.
-
nativeInit
public static int nativeInit(int nativeTransformationId, boolean decrypting, int nativeKeyId, byte[] ivBytes, int ivLength, int tagLength) throws ej.sni.NativeExceptionThrow NativeException on error. Returns a nativeId.- Throws:
ej.sni.NativeException
-
nativeDecrypt
public static int nativeDecrypt(int nativeTransformationId, int nativeId, byte[] buffer, int i, int len, byte[] output, int outputOffset, boolean doFinal) throws ej.sni.NativeException- Throws:
ej.sni.NativeException
-
nativeEncrypt
public static int nativeEncrypt(int nativeTransformationId, int nativeId, byte[] buffer, int i, int len, byte[] output, int outputOffset, boolean doFinal) throws ej.sni.NativeException- Throws:
ej.sni.NativeException
-
nativeClose
public static void nativeClose(int nativeTransformationId, int nativeId) throws ej.sni.NativeException- Throws:
ej.sni.NativeException
-
nativeGetCloseId
public static int nativeGetCloseId(int nativeTransformationId) throws ej.sni.NativeExceptionGets the id of the native close function.- Parameters:
nativeTransformationId- ID of the transformation- Returns:
- the id of the static native close function
- Throws:
ej.sni.NativeException
-
-