web_sys/features/
gen_Pbkdf2Params.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = Pbkdf2Params)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `Pbkdf2Params` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"]
12 pub type Pbkdf2Params;
13 #[doc = "Get the `name` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"]
16 #[wasm_bindgen(method, getter = "name")]
17 pub fn get_name(this: &Pbkdf2Params) -> ::alloc::string::String;
18 #[doc = "Change the `name` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"]
21 #[wasm_bindgen(method, setter = "name")]
22 pub fn set_name(this: &Pbkdf2Params, val: &str);
23 #[doc = "Get the `hash` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"]
26 #[wasm_bindgen(method, getter = "hash")]
27 pub fn get_hash(this: &Pbkdf2Params) -> ::wasm_bindgen::JsValue;
28 #[doc = "Change the `hash` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"]
31 #[wasm_bindgen(method, setter = "hash")]
32 pub fn set_hash(this: &Pbkdf2Params, val: &::wasm_bindgen::JsValue);
33 #[doc = "Get the `iterations` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"]
36 #[wasm_bindgen(method, getter = "iterations")]
37 pub fn get_iterations(this: &Pbkdf2Params) -> u32;
38 #[doc = "Change the `iterations` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"]
41 #[wasm_bindgen(method, setter = "iterations")]
42 pub fn set_iterations(this: &Pbkdf2Params, val: u32);
43 #[doc = "Get the `salt` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"]
46 #[wasm_bindgen(method, getter = "salt")]
47 pub fn get_salt(this: &Pbkdf2Params) -> ::js_sys::Object;
48 #[doc = "Change the `salt` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"]
51 #[wasm_bindgen(method, setter = "salt")]
52 pub fn set_salt(this: &Pbkdf2Params, val: &::js_sys::Object);
53}
54impl Pbkdf2Params {
55 #[doc = "Construct a new `Pbkdf2Params`."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"]
58 pub fn new(
59 name: &str,
60 hash: &::wasm_bindgen::JsValue,
61 iterations: u32,
62 salt: &::js_sys::Object,
63 ) -> Self {
64 #[allow(unused_mut)]
65 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
66 ret.set_name(name);
67 ret.set_hash(hash);
68 ret.set_iterations(iterations);
69 ret.set_salt(salt);
70 ret
71 }
72 #[deprecated = "Use `set_name()` instead."]
73 pub fn name(&mut self, val: &str) -> &mut Self {
74 self.set_name(val);
75 self
76 }
77 #[deprecated = "Use `set_hash()` instead."]
78 pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
79 self.set_hash(val);
80 self
81 }
82 #[deprecated = "Use `set_iterations()` instead."]
83 pub fn iterations(&mut self, val: u32) -> &mut Self {
84 self.set_iterations(val);
85 self
86 }
87 #[deprecated = "Use `set_salt()` instead."]
88 pub fn salt(&mut self, val: &::js_sys::Object) -> &mut Self {
89 self.set_salt(val);
90 self
91 }
92}