gecko-dev/mozglue/android/NativeCrypto.h
Sebastian Kaspari 8f25247ae4 Bug 1197720 - NativeCrypto (SHA-256): Let caller define number of bytes in 'str' to update from. r=snorp
In Java we will call this method with byte array buffers we use to read from a stream. Java does not
guarantee to completely fill the buffer (and can't at the end of a stream). Passing the number of bytes
to read from the array to NativeCrypto avoids copying bytes between arrays of various lengths.

--HG--
extra : commitid : 7Vp3hqUE08T
extra : amend_source : 89845bccc20cfe36b421a568e52bdaa1be2f2800
2015-11-30 15:59:56 +01:00

54 lines
1.6 KiB
C

/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class org_mozilla_gecko_background_nativecode_NativeCrypto */
#ifndef _Included_org_mozilla_gecko_background_nativecode_NativeCrypto
#define _Included_org_mozilla_gecko_background_nativecode_NativeCrypto
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: org_mozilla_gecko_background_nativecode_NativeCrypto
* Method: pbkdf2SHA256
* Signature: ([B[BII)[B
*/
JNIEXPORT jbyteArray JNICALL Java_org_mozilla_gecko_background_nativecode_NativeCrypto_pbkdf2SHA256
(JNIEnv *, jclass, jbyteArray, jbyteArray, jint, jint);
/*
* Class: org_mozilla_gecko_background_nativecode_NativeCrypto
* Method: sha1
* Signature: ([B)[B
*/
JNIEXPORT jbyteArray JNICALL Java_org_mozilla_gecko_background_nativecode_NativeCrypto_sha1
(JNIEnv *, jclass, jbyteArray);
/*
* Class: org_mozilla_gecko_background_nativecode_NativeCrypto
* Method: sha256init
* Signature: ()[B
*/
JNIEXPORT jbyteArray JNICALL Java_org_mozilla_gecko_background_nativecode_NativeCrypto_sha256init
(JNIEnv *, jclass);
/*
* Class: org_mozilla_gecko_background_nativecode_NativeCrypto
* Method: sha256update
* Signature: ([B[B)V
*/
JNIEXPORT void JNICALL Java_org_mozilla_gecko_background_nativecode_NativeCrypto_sha256update
(JNIEnv *, jclass, jbyteArray, jbyteArray, jint);
/*
* Class: org_mozilla_gecko_background_nativecode_NativeCrypto
* Method: sha256finalize
* Signature: ([B)[B
*/
JNIEXPORT jbyteArray JNICALL Java_org_mozilla_gecko_background_nativecode_NativeCrypto_sha256finalize
(JNIEnv *, jclass, jbyteArray);
#ifdef __cplusplus
}
#endif
#endif