// WARNING: This file was autogenerated by jni-bindgen. Any changes to this file may be lost!!!
#[cfg(any(feature = "all", feature = "javax-crypto-KeyGenerator"))]
__jni_bindgen! {
/// public class [KeyGenerator](https://developer.android.com/reference/javax/crypto/KeyGenerator.html)
///
/// Required feature: "javax-crypto-KeyGenerator"
public class KeyGenerator ("javax/crypto/KeyGenerator") extends crate::java::lang::Object {
/// [getAlgorithm](https://developer.android.com/reference/javax/crypto/KeyGenerator.html#getAlgorithm())
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn getAlgorithm<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyGenerator", java.flags == PUBLIC | FINAL, .name == "getAlgorithm", .descriptor == "()Ljava/lang/String;"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("javax/crypto/KeyGenerator\0", "getAlgorithm\0", "()Ljava/lang/String;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getInstance](https://developer.android.com/reference/javax/crypto/KeyGenerator.html#getInstance(java.lang.String))
///
/// Required features: "java-lang-String", "javax-crypto-KeyGenerator"
#[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "javax-crypto-KeyGenerator")))]
pub fn getInstance_String<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::javax::crypto::KeyGenerator>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyGenerator", java.flags == PUBLIC | STATIC | FINAL, .name == "getInstance", .descriptor == "(Ljava/lang/String;)Ljavax/crypto/KeyGenerator;"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("javax/crypto/KeyGenerator\0", "getInstance\0", "(Ljava/lang/String;)Ljavax/crypto/KeyGenerator;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
/// [getInstance](https://developer.android.com/reference/javax/crypto/KeyGenerator.html#getInstance(java.lang.String,%20java.lang.String))
///
/// Required features: "java-lang-String", "javax-crypto-KeyGenerator"
#[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "javax-crypto-KeyGenerator")))]
pub fn getInstance_String_String<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::javax::crypto::KeyGenerator>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyGenerator", java.flags == PUBLIC | STATIC | FINAL, .name == "getInstance", .descriptor == "(Ljava/lang/String;Ljava/lang/String;)Ljavax/crypto/KeyGenerator;"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("javax/crypto/KeyGenerator\0", "getInstance\0", "(Ljava/lang/String;Ljava/lang/String;)Ljavax/crypto/KeyGenerator;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
/// [getInstance](https://developer.android.com/reference/javax/crypto/KeyGenerator.html#getInstance(java.lang.String,%20java.security.Provider))
///
/// Required features: "java-lang-String", "java-security-Provider", "javax-crypto-KeyGenerator"
#[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-security-Provider", feature = "javax-crypto-KeyGenerator")))]
pub fn getInstance_String_Provider<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::Provider>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::javax::crypto::KeyGenerator>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyGenerator", java.flags == PUBLIC | STATIC | FINAL, .name == "getInstance", .descriptor == "(Ljava/lang/String;Ljava/security/Provider;)Ljavax/crypto/KeyGenerator;"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("javax/crypto/KeyGenerator\0", "getInstance\0", "(Ljava/lang/String;Ljava/security/Provider;)Ljavax/crypto/KeyGenerator;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
/// [getProvider](https://developer.android.com/reference/javax/crypto/KeyGenerator.html#getProvider())
///
/// Required features: "java-security-Provider"
#[cfg(any(feature = "all", all(feature = "java-security-Provider")))]
pub fn getProvider<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::security::Provider>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyGenerator", java.flags == PUBLIC | FINAL, .name == "getProvider", .descriptor == "()Ljava/security/Provider;"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("javax/crypto/KeyGenerator\0", "getProvider\0", "()Ljava/security/Provider;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [init](https://developer.android.com/reference/javax/crypto/KeyGenerator.html#init(java.security.SecureRandom))
///
/// Required features: "java-security-SecureRandom"
#[cfg(any(feature = "all", all(feature = "java-security-SecureRandom")))]
pub fn init_SecureRandom<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::SecureRandom>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyGenerator", java.flags == PUBLIC | FINAL, .name == "init", .descriptor == "(Ljava/security/SecureRandom;)V"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("javax/crypto/KeyGenerator\0", "init\0", "(Ljava/security/SecureRandom;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [init](https://developer.android.com/reference/javax/crypto/KeyGenerator.html#init(java.security.spec.AlgorithmParameterSpec))
///
/// Required features: "java-security-spec-AlgorithmParameterSpec"
#[cfg(any(feature = "all", all(feature = "java-security-spec-AlgorithmParameterSpec")))]
pub fn init_AlgorithmParameterSpec<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::spec::AlgorithmParameterSpec>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyGenerator", java.flags == PUBLIC | FINAL, .name == "init", .descriptor == "(Ljava/security/spec/AlgorithmParameterSpec;)V"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("javax/crypto/KeyGenerator\0", "init\0", "(Ljava/security/spec/AlgorithmParameterSpec;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [init](https://developer.android.com/reference/javax/crypto/KeyGenerator.html#init(java.security.spec.AlgorithmParameterSpec,%20java.security.SecureRandom))
///
/// Required features: "java-security-SecureRandom", "java-security-spec-AlgorithmParameterSpec"
#[cfg(any(feature = "all", all(feature = "java-security-SecureRandom", feature = "java-security-spec-AlgorithmParameterSpec")))]
pub fn init_AlgorithmParameterSpec_SecureRandom<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::spec::AlgorithmParameterSpec>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::SecureRandom>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyGenerator", java.flags == PUBLIC | FINAL, .name == "init", .descriptor == "(Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("javax/crypto/KeyGenerator\0", "init\0", "(Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [init](https://developer.android.com/reference/javax/crypto/KeyGenerator.html#init(int))
pub fn init_int<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyGenerator", java.flags == PUBLIC | FINAL, .name == "init", .descriptor == "(I)V"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("javax/crypto/KeyGenerator\0", "init\0", "(I)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [init](https://developer.android.com/reference/javax/crypto/KeyGenerator.html#init(int,%20java.security.SecureRandom))
///
/// Required features: "java-security-SecureRandom"
#[cfg(any(feature = "all", all(feature = "java-security-SecureRandom")))]
pub fn init_int_SecureRandom<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::SecureRandom>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyGenerator", java.flags == PUBLIC | FINAL, .name == "init", .descriptor == "(ILjava/security/SecureRandom;)V"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("javax/crypto/KeyGenerator\0", "init\0", "(ILjava/security/SecureRandom;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [generateKey](https://developer.android.com/reference/javax/crypto/KeyGenerator.html#generateKey())
///
/// Required features: "javax-crypto-SecretKey"
#[cfg(any(feature = "all", all(feature = "javax-crypto-SecretKey")))]
pub fn generateKey<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::javax::crypto::SecretKey>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyGenerator", java.flags == PUBLIC | FINAL, .name == "generateKey", .descriptor == "()Ljavax/crypto/SecretKey;"
unsafe {
let __jni_args = [];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("javax/crypto/KeyGenerator\0", "generateKey\0", "()Ljavax/crypto/SecretKey;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
}
}