All Downloads are FREE. Search and download functionalities are using the official Maven repository.

native.jniutil.bytearraycritical.h Maven / Gradle / Ivy

Go to download

The Long Term Stable (LTS) Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains the JCA/JCE provider and low-level API for the BC LTS version 2.73.7 for Java 8 and later.

There is a newer version: 2.73.7
Show newest version
//
//

#ifndef BC_FIPS_BYTEARRAYCRITICAL_H
#define BC_FIPS_BYTEARRAYCRITICAL_H


#include 
#include 
#include 
#include 

typedef struct {
    uint8_t *critical;
    size_t size;
    JNIEnv *env;
    jbyteArray array;
} critical_bytearray_ctx;




void init_critical_ctx(critical_bytearray_ctx *ctx, JNIEnv *env, jbyteArray array);


/**
 * Actually claim the byte ctx from the jvm if not already claimed.
 * @param ctx pointer to the java_bytearray_ctx
 * @return non zero on success
 */
bool load_critical_ctx(critical_bytearray_ctx *ctx);


/**
 * release_bytearray_ctx releases a java byte ctx back to the jvm
 * null safe and unclaimed safe.
 * @param ctx
 */
void release_critical_ctx(critical_bytearray_ctx *ctx);

#endif //BC_FIPS_BYTEARRAYCRITICAL_H




© 2015 - 2024 Weber Informatics LLC | Privacy Policy