1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


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

        /// <init>
        pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::Result<__jni_bindgen::Local<'env, crate::java::security::SecureRandom>> {
            // class.path == "java/security/SecureRandom", java.flags == PUBLIC, .name == "<init>", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/security/SecureRandom\0", "<init>\0", "()V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// <init>
        pub fn new_byte_array<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray   >>) -> __jni_bindgen::Result<__jni_bindgen::Local<'env, crate::java::security::SecureRandom>> {
            // class.path == "java/security/SecureRandom", java.flags == PUBLIC, .name == "<init>", .descriptor == "([B)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/security/SecureRandom\0", "<init>\0", "([B)V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        // // Not emitting: Non-public method
        // /// <init>
        // ///
        // /// Required features: "java-security-Provider", "java-security-SecureRandomSpi"
        // #[cfg(any(feature = "all", all(feature = "java-security-Provider", feature = "java-security-SecureRandomSpi")))]
        // fn new_secure_random_spi_provider<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::SecureRandomSpi>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::security::Provider>>) -> __jni_bindgen::Result<__jni_bindgen::Local<'env, crate::java::security::SecureRandom>> {
        //     // class.path == "java/security/SecureRandom", java.flags == PROTECTED, .name == "<init>", .descriptor == "(Ljava/security/SecureRandomSpi;Ljava/security/Provider;)V"
        //     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_method("java/security/SecureRandom\0", "<init>\0", "(Ljava/security/SecureRandomSpi;Ljava/security/Provider;)V\0");
        //         __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
        //     }
        // }

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

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

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

        /// [getProvider](https://developer.android.com/reference/java/security/SecureRandom.html#getProvider())
        ///
        /// Required features: "java-security-Provider"
        #[cfg(any(feature = "all", all(feature = "java-security-Provider")))]
        pub fn get_provider<'env>(&'env self) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::security::Provider>>> {
            // class.path == "java/security/SecureRandom", 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/SecureRandom\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/SecureRandom.html#getAlgorithm())
        ///
        /// Required features: "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        pub fn get_algorithm<'env>(&'env self) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::lang::String>>> {
            // class.path == "java/security/SecureRandom", java.flags == PUBLIC, .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/SecureRandom\0", "getAlgorithm\0", "()Ljava/lang/String;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// setSeed
        pub fn set_seed_byte_array<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray   >>) -> __jni_bindgen::Result<()> {
            // class.path == "java/security/SecureRandom", java.flags == PUBLIC | SYNCRONIZED, .name == "setSeed", .descriptor == "([B)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("java/security/SecureRandom\0", "setSeed\0", "([B)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [setSeed](https://developer.android.com/reference/java/security/SecureRandom.html#setSeed(long))
        pub fn set_seed_long<'env>(&'env self, arg0: i64) -> __jni_bindgen::Result<()> {
            // class.path == "java/security/SecureRandom", java.flags == PUBLIC, .name == "setSeed", .descriptor == "(J)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("java/security/SecureRandom\0", "setSeed\0", "(J)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// nextBytes
        pub fn next_bytes<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env __jni_bindgen::ByteArray   >>) -> __jni_bindgen::Result<()> {
            // class.path == "java/security/SecureRandom", java.flags == PUBLIC | SYNCRONIZED, .name == "nextBytes", .descriptor == "([B)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("java/security/SecureRandom\0", "nextBytes\0", "([B)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        // // Not emitting: Non-public method
        // /// [next](https://developer.android.com/reference/java/security/SecureRandom.html#next(int))
        // fn next<'env>(&'env self, arg0: i32) -> __jni_bindgen::Result<i32> {
        //     // class.path == "java/security/SecureRandom", java.flags == PROTECTED | FINAL, .name == "next", .descriptor == "(I)I"
        //     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("java/security/SecureRandom\0", "next\0", "(I)I\0");
        //         __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
        //     }
        // }

        /// [getSeed](https://developer.android.com/reference/java/security/SecureRandom.html#getSeed(int))
        pub fn get_seed<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, __jni_bindgen::ByteArray   >>> {
            // class.path == "java/security/SecureRandom", java.flags == PUBLIC | STATIC, .name == "getSeed", .descriptor == "(I)[B"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/security/SecureRandom\0", "getSeed\0", "(I)[B\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [generateSeed](https://developer.android.com/reference/java/security/SecureRandom.html#generateSeed(int))
        pub fn generate_seed<'env>(&'env self, arg0: i32) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, __jni_bindgen::ByteArray   >>> {
            // class.path == "java/security/SecureRandom", java.flags == PUBLIC, .name == "generateSeed", .descriptor == "(I)[B"
            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("java/security/SecureRandom\0", "generateSeed\0", "(I)[B\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getInstanceStrong](https://developer.android.com/reference/java/security/SecureRandom.html#getInstanceStrong())
        ///
        /// Required features: "java-security-SecureRandom"
        #[cfg(any(feature = "all", all(feature = "java-security-SecureRandom")))]
        pub fn get_instance_strong<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::security::SecureRandom>>> {
            // class.path == "java/security/SecureRandom", java.flags == PUBLIC | STATIC, .name == "getInstanceStrong", .descriptor == "()Ljava/security/SecureRandom;"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/security/SecureRandom\0", "getInstanceStrong\0", "()Ljava/security/SecureRandom;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}