Lines Matching refs:jbyteArray
767 static bool arrayToBignum(JNIEnv* env, jbyteArray source, BIGNUM** dest) {
826 static jbyteArray bignumToArray(JNIEnv* env, const BIGNUM* source, const char* sourceName) {
835 jbyteArray javaBytes = env->NewByteArray(numBytes);
867 * Converts various OpenSSL ASN.1 types to a jbyteArray with DER-encoded data
872 jbyteArray ASN1ToByteArray(JNIEnv* env, T* obj) {
886 ScopedLocalRef<jbyteArray> byteArray(env, env->NewByteArray(derLen));
911 T* ByteArrayToASN1(JNIEnv* env, jbyteArray byteArray) {
1076 ScopedLocalRef<jbyteArray> javaBytes(env, env->NewByteArray(len));
1122 ScopedLocalRef<jbyteArray> javaBytes(env, env->NewByteArray(len));
1221 static jbyteArray rawSignDigestWithPrivateKey(JNIEnv* env, jobject privateKey,
1223 ScopedLocalRef<jbyteArray> messageArray(env, env->NewByteArray(message_len));
1246 return reinterpret_cast<jbyteArray>(env->CallStaticObjectMethod(
1250 static jbyteArray rawCipherWithPrivateKey(JNIEnv* env, jobject privateKey, jboolean encrypt,
1252 ScopedLocalRef<jbyteArray> ciphertextArray(env, env->NewByteArray(ciphertext_len));
1275 return reinterpret_cast<jbyteArray>(env->CallStaticObjectMethod(
1341 ScopedLocalRef<jbyteArray> signature(
1393 ScopedLocalRef<jbyteArray> cleartext(env, rawCipherWithPrivateKey(env, private_key, false,
1477 ScopedLocalRef<jbyteArray> signature(
1619 ScopedLocalRef<jbyteArray> signature(
1978 jbyteArray p, jbyteArray g,
1979 jbyteArray pub_key, jbyteArray priv_key) {
2040 jbyteArray p, jbyteArray q, jbyteArray g,
2041 jbyteArray pub_key, jbyteArray priv_key) {
2096 jbyteArray n, jbyteArray e, jbyteArray d,
2097 jbyteArray p, jbyteArray q,
2098 jbyteArray dmp1, jbyteArray dmq1,
2099 jbyteArray iqmp) {
2190 jlong pubkeyRef, jbyteArray keyJavaBytes) {
2269 jbyteArray keyJavaBytes)
2413 static jbyteArray NativeCrypto_i2d_PKCS8_PRIV_KEY_INFO(JNIEnv* env, jclass, jlong pkeyRef) {
2435 static jlong NativeCrypto_d2i_PKCS8_PRIV_KEY_INFO(JNIEnv* env, jclass, jbyteArray keyJavaBytes) {
2466 static jbyteArray NativeCrypto_i2d_PUBKEY(JNIEnv* env, jclass, jlong pkeyRef) {
2475 static jlong NativeCrypto_d2i_PUBKEY(JNIEnv* env, jclass, jbyteArray javaBytes) {
2496 jbyteArray modulusBytes) {
2530 jbyteArray qBytes) {
2605 jbyteArray publicExponent) {
2664 jbyteArray fromJavaBytes, jbyteArray toJavaBytes, jlong pkeyRef, jint padding) {
2703 jbyteArray fromJavaBytes, jbyteArray toJavaBytes, jlong pkeyRef, jint padding) {
2708 jbyteArray fromJavaBytes, jbyteArray toJavaBytes, jlong pkeyRef, jint padding) {
2713 jbyteArray fromJavaBytes, jbyteArray toJavaBytes, jlong pkeyRef, jint padding) {
2718 jbyteArray fromJavaBytes, jbyteArray toJavaBytes, jlong pkeyRef, jint padding) {
2746 jbyteArray n = bignumToArray(env, rsa->n, "n");
2752 jbyteArray e = bignumToArray(env, rsa->e, "e");
2784 jbyteArray n = bignumToArray(env, rsa->n, "n");
2791 jbyteArray e = bignumToArray(env, rsa->e, "e");
2799 jbyteArray d = bignumToArray(env, rsa->d, "d");
2807 jbyteArray p = bignumToArray(env, rsa->p, "p");
2815 jbyteArray q = bignumToArray(env, rsa->q, "q");
2823 jbyteArray dmp1 = bignumToArray(env, rsa->dmp1, "dmp1");
2831 jbyteArray dmq1 = bignumToArray(env, rsa->dmq1, "dmq1");
2839 jbyteArray iqmp = bignumToArray(env, rsa->iqmp, "iqmp");
2853 jbyteArray seedJavaBytes, jbyteArray gBytes, jbyteArray pBytes, jbyteArray qBytes) {
2952 jbyteArray g = bignumToArray(env, dsa->g, "g");
2960 jbyteArray p = bignumToArray(env, dsa->p, "p");
2968 jbyteArray q = bignumToArray(env, dsa->q, "q");
2976 jbyteArray pub_key = bignumToArray(env, dsa->pub_key, "pub_key");
2984 jbyteArray priv_key = bignumToArray(env, dsa->priv_key, "priv_key");
3093 jbyteArray p = bignumToArray(env, dh->p, "p");
3101 jbyteArray g = bignumToArray(env, dh->g, "g");
3109 jbyteArray pub_key = bignumToArray(env, dh->pub_key, "pub_key");
3117 jbyteArray priv_key = bignumToArray(env, dh->priv_key, "priv_key");
3207 static jlong NativeCrypto_EC_GROUP_new_curve(JNIEnv* env, jclass, jint type, jbyteArray pJava,
3208 jbyteArray aJava, jbyteArray bJava)
3318 jbyteArray pArray = bignumToArray(env, p.get(), "p");
3324 jbyteArray aArray = bignumToArray(env, a.get(), "a");
3330 jbyteArray bArray = bignumToArray(env, b.get(), "b");
3340 static jbyteArray NativeCrypto_EC_GROUP_get_order(JNIEnv* env, jclass, jlong groupRef)
3358 jbyteArray orderArray = bignumToArray(env, order.get(), "order");
3383 static jbyteArray NativeCrypto_EC_GROUP_get_cofactor(JNIEnv* env, jclass, jlong groupRef)
3401 jbyteArray cofactorArray = bignumToArray(env, cofactor.get(), "cofactor");
3458 static void NativeCrypto_EC_GROUP_set_generator(JNIEnv* env, jclass, jlong groupRef, jlong pointRef, jbyteArray njavaBytes, jbyteArray hjavaBytes)
3570 jlong groupRef, jlong pointRef, jbyteArray xjavaBytes, jbyteArray yjavaBytes)
3650 jbyteArray xBytes = bignumToArray(env, x.get(), "x");
3656 jbyteArray yBytes = bignumToArray(env, y.get(), "y");
3729 static jbyteArray NativeCrypto_EC_KEY_get_private_key(JNIEnv* env, jclass, jlong pkeyRef)
3747 jbyteArray privBytes = bignumToArray(env, privkey, "privkey");
3806 jbyteArray outArray, jint outOffset, jlong pubkeyRef, jlong privkeyRef)
3924 static jint NativeCrypto_EVP_DigestFinal(JNIEnv* env, jclass, jobject ctxRef, jbyteArray hash,
4080 static void evpUpdate(JNIEnv* env, jobject evpMdCtxRef, jbyteArray inJavaBytes, jint inOffset,
4117 jbyteArray inJavaBytes, jint inOffset, jint inLength) {
4123 jbyteArray inJavaBytes, jint inOffset, jint inLength) {
4129 jbyteArray inJavaBytes, jint inOffset, jint inLength) {
4134 static jbyteArray NativeCrypto_EVP_DigestSignFinal(JNIEnv* env, jclass, jobject evpMdCtxRef)
4144 ScopedLocalRef<jbyteArray> outJavaBytes(env, env->NewByteArray(expectedSize));
4172 static jint NativeCrypto_EVP_SignFinal(JNIEnv* env, jclass, jobject ctxRef, jbyteArray signature,
4207 jbyteArray buffer, jint offset, jint length) {
4243 static jint NativeCrypto_EVP_VerifyFinal(JNIEnv* env, jclass, jobject ctxRef, jbyteArray buffer,
4305 jbyteArray keyArray, jbyteArray ivArray, jboolean encrypting) {
4355 static jint NativeCrypto_EVP_CipherUpdate(JNIEnv* env, jclass, jlong ctxRef, jbyteArray outArray,
4356 jint outOffset, jbyteArray inArray, jint inOffset, jint inLength) {
4406 static jint NativeCrypto_EVP_CipherFinal_ex(JNIEnv* env, jclass, jlong ctxRef, jbyteArray outArray,
4545 jbyteArray seed) {
4565 static void NativeCrypto_RAND_bytes(JNIEnv* env, jclass, jbyteArray output) {
4676 static int NativeCrypto_BIO_read(JNIEnv* env, jclass, jlong bioRef, jbyteArray outputJavaBytes) {
4706 static void NativeCrypto_BIO_write(JNIEnv* env, jclass, jlong bioRef, jbyteArray inputJavaBytes,
4981 static jbyteArray get_X509Type_serialNumber(JNIEnv* env, T* x509Type, ASN1_INTEGER* (*get_serial_func)(T*)) {
4997 ScopedLocalRef<jbyteArray> serialArray(env, bignumToArray(env, serialBn.get(), "serialBn"));
5014 static jbyteArray NativeCrypto_X509_get_serialNumber(JNIEnv* env, jclass, jlong x509Ref) {
5020 static jbyteArray NativeCrypto_X509_REVOKED_get_serialNumber(JNIEnv* env, jclass, jlong x509RevokedRef) {
5051 static jbyteArray NativeCrypto_get_X509_cert_info_enc(JNIEnv* env, jclass, jlong x509Ref) {
5091 static jbyteArray get_X509Type_signature(JNIEnv* env, T* x509Type, void (*get_signature_func)(T*, ASN1_BIT_STRING**)) {
5103 ScopedLocalRef<jbyteArray> signatureArray(env, env->NewByteArray(signature->length));
5122 static jbyteArray NativeCrypto_get_X509_signature(JNIEnv* env, jclass, jlong x509Ref) {
5128 static jbyteArray NativeCrypto_get_X509_CRL_signature(JNIEnv* env, jclass, jlong x509CrlRef) {
5160 static jlong NativeCrypto_X509_CRL_get0_by_serial(JNIEnv* env, jclass, jlong x509crlRef, jbyteArray serialArray) {
5238 static jbyteArray NativeCrypto_i2d_X509_CRL(JNIEnv* env, jclass, jlong x509CrlRef) {
5295 static jbyteArray NativeCrypto_get_X509_CRL_sig_alg_parameter(JNIEnv* env, jclass, jlong x509CrlRef) {
5313 static jbyteArray NativeCrypto_X509_CRL_get_issuer_name(JNIEnv* env, jclass, jlong x509CrlRef) {
5363 static jbyteArray X509Type_get_ext_oid(JNIEnv* env, T* x509Type, jstring oidString) {
5451 static jbyteArray NativeCrypto_get_X509_CRL_crl_enc(JNIEnv* env, jclass, jlong x509CrlRef) {
5512 static jbyteArray NativeCrypto_i2d_X509_REVOKED(JNIEnv* env, jclass, jlong x509RevokedRef) {
5641 static jlong NativeCrypto_d2i_X509(JNIEnv* env, jclass, jbyteArray certBytes) {
5646 static jbyteArray NativeCrypto_i2d_X509(JNIEnv* env, jclass, jlong x509Ref) {
5652 static jbyteArray NativeCrypto_i2d_X509_PUBKEY(JNIEnv* env, jclass, jlong x509Ref) {
5798 static jbyteArray NativeCrypto_i2d_PKCS7(JNIEnv* env, jclass, jlongArray certsArray) {
5855 static jbyteArray NativeCrypto_ASN1_seq_pack_X509(JNIEnv* env, jclass, jlongArray certs) {
5884 ScopedLocalRef<jbyteArray> byteArray(env, env->NewByteArray(len));
6004 static jbyteArray NativeCrypto_X509_get_issuer_name(JNIEnv* env, jclass, jlong x509Ref) {
6010 static jbyteArray NativeCrypto_X509_get_subject_name(JNIEnv* env, jclass, jlong x509Ref) {
6043 static jbyteArray NativeCrypto_get_X509_sig_alg_parameter(JNIEnv* env, jclass, jlong x509Ref) {
6166 static jbyteArray NativeCrypto_X509_get_ext_oid(JNIEnv* env, jclass, jlong x509Ref,
6173 static jbyteArray NativeCrypto_X509_CRL_get_ext_oid(JNIEnv* env, jclass, jlong x509CrlRef,
6181 static jbyteArray NativeCrypto_X509_REVOKED_get_ext_oid(JNIEnv* env, jclass, jlong x509RevokedRef,
6353 ScopedLocalRef<jbyteArray> byteArray(env, ASN1ToByteArray<X509_NAME, i2d_X509_NAME>(env,
6447 jbyteArray npnProtocolsArray;
6450 jbyteArray alpnProtocolsArray;
6523 bool setCallbackState(JNIEnv* e, jobject shc, jobject fd, jbyteArray npnProtocols,
6524 jbyteArray alpnProtocols) {
6850 jbyteArray keyTypes = env->NewByteArray(ctype_num);
6910 ScopedLocalRef<jbyteArray> identityJava(env, env->NewByteArray(max_identity_len));
6915 ScopedLocalRef<jbyteArray> keyJava(env, env->NewByteArray(max_psk_len));
6984 ScopedLocalRef<jbyteArray> keyJava(env, env->NewByteArray(max_psk_len));
7187 jlong ssl_ctx_address, jbyteArray sid_ctx)
7279 static jbyteArray NativeCrypto_SSL_get_tls_channel_id(JNIEnv* env, jclass, jlong ssl_address)
7289 jbyteArray javaBytes = env->NewByteArray(64);
7510 ScopedLocalRef<jbyteArray> principal(env,
7511 reinterpret_cast<jbyteArray>(env->GetObjectArrayElement(principals, i)));
8012 static jbyteArray NativeCrypto_SSL_get_npn_negotiated_protocol(JNIEnv* env, jclass,
8026 jbyteArray result = env->NewByteArray(npnLength);
8034 jbyteArray protos) {
8060 static jbyteArray NativeCrypto_SSL_get0_alpn_selected(JNIEnv* env, jclass,
8074 jbyteArray result = env->NewByteArray(npnLength);
8145 jlong rbioRef, jlong wbioRef, jobject shc, jboolean client_mode, jbyteArray npnProtocols,
8146 jbyteArray alpnProtocols) {
8238 jobject shc, jint timeout_millis, jboolean client_mode, jbyteArray npnProtocols,
8239 jbyteArray alpnProtocols) {
8666 static jint NativeCrypto_SSL_read_BIO(JNIEnv* env, jclass, jlong sslRef, jbyteArray destJava,
8798 jobject shc, jbyteArray b, jint offset, jint len,
9006 static int NativeCrypto_SSL_write_BIO(JNIEnv* env, jclass, jlong sslRef, jbyteArray sourceJava, jint len,
9128 jobject shc, jbyteArray b, jint offset, jint len, jint write_timeout_millis)
9386 static jbyteArray NativeCrypto_SSL_SESSION_session_id(JNIEnv* env, jclass,
9393 jbyteArray result = env->NewByteArray(ssl_session->session_id_length);
9468 static jbyteArray NativeCrypto_i2d_SSL_SESSION(JNIEnv* env, jclass, jlong ssl_session_address) {
9480 static jlong NativeCrypto_d2i_SSL_SESSION(JNIEnv* env, jclass, jbyteArray javaBytes) {