web_sys/features/
gen_AesGcmParams.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 = AesGcmParams)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `AesGcmParams` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
12 pub type AesGcmParams;
13 #[doc = "Get the `name` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
16 #[wasm_bindgen(method, getter = "name")]
17 pub fn get_name(this: &AesGcmParams) -> ::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: `AesGcmParams`*"]
21 #[wasm_bindgen(method, setter = "name")]
22 pub fn set_name(this: &AesGcmParams, val: &str);
23 #[doc = "Get the `additionalData` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
26 #[wasm_bindgen(method, getter = "additionalData")]
27 pub fn get_additional_data(this: &AesGcmParams) -> Option<::js_sys::Object>;
28 #[doc = "Change the `additionalData` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
31 #[wasm_bindgen(method, setter = "additionalData")]
32 pub fn set_additional_data(this: &AesGcmParams, val: &::js_sys::Object);
33 #[doc = "Change the `additionalData` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
36 #[wasm_bindgen(method, setter = "additionalData")]
37 pub fn set_additional_data_buffer_source(this: &AesGcmParams, val: &::js_sys::Object);
38 #[doc = "Change the `additionalData` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
41 #[wasm_bindgen(method, setter = "additionalData")]
42 pub fn set_additional_data_u8_slice(this: &AesGcmParams, val: &mut [u8]);
43 #[doc = "Change the `additionalData` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
46 #[wasm_bindgen(method, setter = "additionalData")]
47 pub fn set_additional_data_u8_array(this: &AesGcmParams, val: &::js_sys::Uint8Array);
48 #[doc = "Get the `iv` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
51 #[wasm_bindgen(method, getter = "iv")]
52 pub fn get_iv(this: &AesGcmParams) -> ::js_sys::Object;
53 #[doc = "Change the `iv` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
56 #[wasm_bindgen(method, setter = "iv")]
57 pub fn set_iv(this: &AesGcmParams, val: &::js_sys::Object);
58 #[doc = "Change the `iv` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
61 #[wasm_bindgen(method, setter = "iv")]
62 pub fn set_iv_buffer_source(this: &AesGcmParams, val: &::js_sys::Object);
63 #[doc = "Change the `iv` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
66 #[wasm_bindgen(method, setter = "iv")]
67 pub fn set_iv_u8_slice(this: &AesGcmParams, val: &mut [u8]);
68 #[doc = "Change the `iv` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
71 #[wasm_bindgen(method, setter = "iv")]
72 pub fn set_iv_u8_array(this: &AesGcmParams, val: &::js_sys::Uint8Array);
73 #[doc = "Get the `tagLength` field of this object."]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
76 #[wasm_bindgen(method, getter = "tagLength")]
77 pub fn get_tag_length(this: &AesGcmParams) -> Option<u8>;
78 #[doc = "Change the `tagLength` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
81 #[wasm_bindgen(method, setter = "tagLength")]
82 pub fn set_tag_length(this: &AesGcmParams, val: u8);
83}
84impl AesGcmParams {
85 #[doc = "Construct a new `AesGcmParams`."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
88 pub fn new(name: &str, iv: &::js_sys::Object) -> Self {
89 #[allow(unused_mut)]
90 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
91 ret.set_name(name);
92 ret.set_iv(iv);
93 ret
94 }
95 #[doc = "Construct a new `AesGcmParams`."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
98 pub fn new_with_u8_slice(name: &str, iv: &mut [u8]) -> Self {
99 #[allow(unused_mut)]
100 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
101 ret.set_name(name);
102 ret.set_iv_u8_slice(iv);
103 ret
104 }
105 #[doc = "Construct a new `AesGcmParams`."]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"]
108 pub fn new_with_u8_array(name: &str, iv: &::js_sys::Uint8Array) -> Self {
109 #[allow(unused_mut)]
110 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
111 ret.set_name(name);
112 ret.set_iv_u8_array(iv);
113 ret
114 }
115 #[deprecated = "Use `set_name()` instead."]
116 pub fn name(&mut self, val: &str) -> &mut Self {
117 self.set_name(val);
118 self
119 }
120 #[deprecated = "Use `set_additional_data()` instead."]
121 pub fn additional_data(&mut self, val: &::js_sys::Object) -> &mut Self {
122 self.set_additional_data(val);
123 self
124 }
125 #[deprecated = "Use `set_iv()` instead."]
126 pub fn iv(&mut self, val: &::js_sys::Object) -> &mut Self {
127 self.set_iv(val);
128 self
129 }
130 #[deprecated = "Use `set_tag_length()` instead."]
131 pub fn tag_length(&mut self, val: u8) -> &mut Self {
132 self.set_tag_length(val);
133 self
134 }
135}