pub struct KemSecretKey {
pub data: Vec<u8>,
}Expand description
KEM secret key with automatic memory zeroization
Fields§
§data: Vec<u8>Implementations§
Source§impl KemSecretKey
impl KemSecretKey
Source§impl KemSecretKey
impl KemSecretKey
Sourcepub fn new_from_bytes(data: Vec<u8>) -> KemSecretKey
pub fn new_from_bytes(data: Vec<u8>) -> KemSecretKey
Create a new KEM secret key from bytes for WASM
Sourcepub fn bytes(&self) -> Uint8Array
pub fn bytes(&self) -> Uint8Array
Copy the key material into a new Uint8Array for WASM (avoids returning an owned non-zeroizing Vec<u8>).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KemSecretKey
impl<'de> Deserialize<'de> for KemSecretKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<KemSecretKey> for JsValue
impl From<KemSecretKey> for JsValue
Source§fn from(value: KemSecretKey) -> Self
fn from(value: KemSecretKey) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for KemSecretKey
impl FromWasmAbi for KemSecretKey
Source§impl IntoWasmAbi for KemSecretKey
impl IntoWasmAbi for KemSecretKey
Source§impl LongRefFromWasmAbi for KemSecretKey
impl LongRefFromWasmAbi for KemSecretKey
Source§type Abi = WasmPtr<WasmRefCell<KemSecretKey>>
type Abi = WasmPtr<WasmRefCell<KemSecretKey>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<KemSecretKey>
type Anchor = RcRef<KemSecretKey>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for KemSecretKey
impl OptionFromWasmAbi for KemSecretKey
Source§impl OptionIntoWasmAbi for KemSecretKey
impl OptionIntoWasmAbi for KemSecretKey
Source§impl RefFromWasmAbi for KemSecretKey
impl RefFromWasmAbi for KemSecretKey
Source§type Abi = WasmPtr<WasmRefCell<KemSecretKey>>
type Abi = WasmPtr<WasmRefCell<KemSecretKey>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<KemSecretKey>
type Anchor = RcRef<KemSecretKey>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for KemSecretKey
impl RefMutFromWasmAbi for KemSecretKey
Source§type Abi = WasmPtr<WasmRefCell<KemSecretKey>>
type Abi = WasmPtr<WasmRefCell<KemSecretKey>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<KemSecretKey>
type Anchor = RcRefMut<KemSecretKey>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl Serialize for KemSecretKey
impl Serialize for KemSecretKey
Source§impl TryFromJsValue for KemSecretKey
impl TryFromJsValue for KemSecretKey
Source§impl VectorFromWasmAbi for KemSecretKey
impl VectorFromWasmAbi for KemSecretKey
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[KemSecretKey]>
Source§impl VectorIntoWasmAbi for KemSecretKey
impl VectorIntoWasmAbi for KemSecretKey
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[KemSecretKey]>) -> Self::Abi
Source§impl WasmDescribeVector for KemSecretKey
impl WasmDescribeVector for KemSecretKey
Source§impl Zeroize for KemSecretKey
Available on crate feature alloc only.
impl Zeroize for KemSecretKey
Available on crate feature
alloc only.impl SupportsConstructor for KemSecretKey
impl SupportsInstanceProperty for KemSecretKey
impl SupportsStaticProperty for KemSecretKey
impl ZeroizeOnDrop for KemSecretKey
Available on crate feature
alloc only.Auto Trait Implementations§
impl Freeze for KemSecretKey
impl RefUnwindSafe for KemSecretKey
impl Send for KemSecretKey
impl Sync for KemSecretKey
impl Unpin for KemSecretKey
impl UnsafeUnpin for KemSecretKey
impl UnwindSafe for KemSecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.