jni-android-sys 0.0.10

Autogenerated glue code for access Android JVM APIs from Rust
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "java-security-KeyFactory"))]
__jni_bindgen! {
    /// public class [KeyFactory](https://developer.android.com/reference/java/security/KeyFactory.html)
    ///
    /// Required feature: "java-security-KeyFactory"
    public class KeyFactory ("java/security/KeyFactory") extends crate::java::lang::Object {

        /// [getInstance](https://developer.android.com/reference/java/security/KeyFactory.html#getInstance(java.lang.String))
        ///
        /// Required features: "java-lang-String", "java-security-KeyFactory"
        #[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-security-KeyFactory")))]
        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::java::security::KeyFactory>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/security/KeyFactory", java.flags == PUBLIC | STATIC, .name == "getInstance", .descriptor == "(Ljava/lang/String;)Ljava/security/KeyFactory;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/security/KeyFactory\0", "getInstance\0", "(Ljava/lang/String;)Ljava/security/KeyFactory;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getInstance](https://developer.android.com/reference/java/security/KeyFactory.html#getInstance(java.lang.String,%20java.lang.String))
        ///
        /// Required features: "java-lang-String", "java-security-KeyFactory"
        #[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-security-KeyFactory")))]
        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::java::security::KeyFactory>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/security/KeyFactory", java.flags == PUBLIC | STATIC, .name == "getInstance", .descriptor == "(Ljava/lang/String;Ljava/lang/String;)Ljava/security/KeyFactory;"
            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("java/security/KeyFactory\0", "getInstance\0", "(Ljava/lang/String;Ljava/lang/String;)Ljava/security/KeyFactory;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getInstance](https://developer.android.com/reference/java/security/KeyFactory.html#getInstance(java.lang.String,%20java.security.Provider))
        ///
        /// Required features: "java-lang-String", "java-security-KeyFactory", "java-security-Provider"
        #[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-security-KeyFactory", feature = "java-security-Provider")))]
        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::java::security::KeyFactory>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/security/KeyFactory", java.flags == PUBLIC | STATIC, .name == "getInstance", .descriptor == "(Ljava/lang/String;Ljava/security/Provider;)Ljava/security/KeyFactory;"
            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("java/security/KeyFactory\0", "getInstance\0", "(Ljava/lang/String;Ljava/security/Provider;)Ljava/security/KeyFactory;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getProvider](https://developer.android.com/reference/java/security/KeyFactory.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 == "java/security/KeyFactory", 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("java/security/KeyFactory\0", "getProvider\0", "()Ljava/security/Provider;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getAlgorithm](https://developer.android.com/reference/java/security/KeyFactory.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 == "java/security/KeyFactory", 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("java/security/KeyFactory\0", "getAlgorithm\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [generatePublic](https://developer.android.com/reference/java/security/KeyFactory.html#generatePublic(java.security.spec.KeySpec))
        ///
        /// Required features: "java-security-PublicKey", "java-security-spec-KeySpec"
        #[cfg(any(feature = "all", all(feature = "java-security-PublicKey", feature = "java-security-spec-KeySpec")))]
        pub fn generatePublic<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::spec::KeySpec>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::security::PublicKey>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/security/KeyFactory", java.flags == PUBLIC | FINAL, .name == "generatePublic", .descriptor == "(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;"
            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("java/security/KeyFactory\0", "generatePublic\0", "(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [generatePrivate](https://developer.android.com/reference/java/security/KeyFactory.html#generatePrivate(java.security.spec.KeySpec))
        ///
        /// Required features: "java-security-PrivateKey", "java-security-spec-KeySpec"
        #[cfg(any(feature = "all", all(feature = "java-security-PrivateKey", feature = "java-security-spec-KeySpec")))]
        pub fn generatePrivate<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::spec::KeySpec>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::security::PrivateKey>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/security/KeyFactory", java.flags == PUBLIC | FINAL, .name == "generatePrivate", .descriptor == "(Ljava/security/spec/KeySpec;)Ljava/security/PrivateKey;"
            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("java/security/KeyFactory\0", "generatePrivate\0", "(Ljava/security/spec/KeySpec;)Ljava/security/PrivateKey;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getKeySpec](https://developer.android.com/reference/java/security/KeyFactory.html#getKeySpec(java.security.Key,%20java.lang.Class))
        ///
        /// Required features: "java-lang-Class", "java-security-Key", "java-security-spec-KeySpec"
        #[cfg(any(feature = "all", all(feature = "java-lang-Class", feature = "java-security-Key", feature = "java-security-spec-KeySpec")))]
        pub fn getKeySpec<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::Key>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Class>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::security::spec::KeySpec>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/security/KeyFactory", java.flags == PUBLIC | FINAL, .name == "getKeySpec", .descriptor == "(Ljava/security/Key;Ljava/lang/Class;)Ljava/security/spec/KeySpec;"
            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("java/security/KeyFactory\0", "getKeySpec\0", "(Ljava/security/Key;Ljava/lang/Class;)Ljava/security/spec/KeySpec;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [translateKey](https://developer.android.com/reference/java/security/KeyFactory.html#translateKey(java.security.Key))
        ///
        /// Required features: "java-security-Key"
        #[cfg(any(feature = "all", all(feature = "java-security-Key")))]
        pub fn translateKey<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::Key>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::security::Key>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/security/KeyFactory", java.flags == PUBLIC | FINAL, .name == "translateKey", .descriptor == "(Ljava/security/Key;)Ljava/security/Key;"
            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("java/security/KeyFactory\0", "translateKey\0", "(Ljava/security/Key;)Ljava/security/Key;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}