1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = Crypto , typescript_type = "Crypto")]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `Crypto` class."]
9     #[doc = ""]
10     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Crypto)"]
11     #[doc = ""]
12     #[doc = "*This API requires the following crate features to be activated: `Crypto`*"]
13     pub type Crypto;
14     #[cfg(feature = "SubtleCrypto")]
15     # [wasm_bindgen (structural , method , getter , js_class = "Crypto" , js_name = subtle)]
16     #[doc = "Getter for the `subtle` field of this object."]
17     #[doc = ""]
18     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle)"]
19     #[doc = ""]
20     #[doc = "*This API requires the following crate features to be activated: `Crypto`, `SubtleCrypto`*"]
subtle(this: &Crypto) -> SubtleCrypto21     pub fn subtle(this: &Crypto) -> SubtleCrypto;
22     # [wasm_bindgen (catch , method , structural , js_class = "Crypto" , js_name = getRandomValues)]
23     #[doc = "The `getRandomValues()` method."]
24     #[doc = ""]
25     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)"]
26     #[doc = ""]
27     #[doc = "*This API requires the following crate features to be activated: `Crypto`*"]
get_random_values_with_array_buffer_view( this: &Crypto, array: &::js_sys::Object, ) -> Result<::js_sys::Object, JsValue>28     pub fn get_random_values_with_array_buffer_view(
29         this: &Crypto,
30         array: &::js_sys::Object,
31     ) -> Result<::js_sys::Object, JsValue>;
32     # [wasm_bindgen (catch , method , structural , js_class = "Crypto" , js_name = getRandomValues)]
33     #[doc = "The `getRandomValues()` method."]
34     #[doc = ""]
35     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)"]
36     #[doc = ""]
37     #[doc = "*This API requires the following crate features to be activated: `Crypto`*"]
get_random_values_with_u8_array( this: &Crypto, array: &mut [u8], ) -> Result<::js_sys::Object, JsValue>38     pub fn get_random_values_with_u8_array(
39         this: &Crypto,
40         array: &mut [u8],
41     ) -> Result<::js_sys::Object, JsValue>;
42 }
43