pub struct SigSecretKey {
pub data: Vec<u8>,
}Expand description
Signature secret key.
§Zeroization
With the alloc feature, the key bytes in data are zeroized when the value
is dropped (#[derive(ZeroizeOnDrop)]), and can be wiped earlier by calling
[Zeroize::zeroize]. This is best-effort and covers only the current
allocation:
- If the
Vechas ever reallocated (growth,shrink_to_fit), earlier copies of its contents may remain elsewhere on the heap; the wipe cannot reach them. Construct keys with their final contents and do not growdata. datais a public field: moving the buffer out (for example withcore::mem::take(&mut key.data)) transfers ownership of the secret bytes — and responsibility for wiping them — to the caller.- Copies made through accessors (
as_bytes, serialization, the wasmbytes()method) are outside the scope of this wipe. - Without the
allocfeature,datais a borrowed&'static [u8]and is deliberately not zeroized: the borrow is not this type’s to wipe. - On wasm32 (feature
wasm), the value is dropped — and therefore wiped — when JavaScript calls.free()on the handle or itsFinalizationRegistryentry runs; if neither happens, the wipe never runs.
Fields§
§data: Vec<u8>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SigSecretKey
impl<'de> Deserialize<'de> for SigSecretKey
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 Drop for SigSecretKey
impl Drop for SigSecretKey
Source§impl From<SigSecretKey> for JsValue
impl From<SigSecretKey> for JsValue
Source§fn from(value: SigSecretKey) -> Self
fn from(value: SigSecretKey) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for SigSecretKey
impl FromWasmAbi for SigSecretKey
Source§impl IntoWasmAbi for SigSecretKey
impl IntoWasmAbi for SigSecretKey
Source§impl LongRefFromWasmAbi for SigSecretKey
impl LongRefFromWasmAbi for SigSecretKey
Source§type Abi = WasmPtr<WasmRefCell<SigSecretKey>>
type Abi = WasmPtr<WasmRefCell<SigSecretKey>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<SigSecretKey>
type Anchor = RcRef<SigSecretKey>
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 SigSecretKey
impl OptionFromWasmAbi for SigSecretKey
Source§impl OptionIntoWasmAbi for SigSecretKey
impl OptionIntoWasmAbi for SigSecretKey
Source§impl RefFromWasmAbi for SigSecretKey
impl RefFromWasmAbi for SigSecretKey
Source§type Abi = WasmPtr<WasmRefCell<SigSecretKey>>
type Abi = WasmPtr<WasmRefCell<SigSecretKey>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<SigSecretKey>
type Anchor = RcRef<SigSecretKey>
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 SigSecretKey
impl RefMutFromWasmAbi for SigSecretKey
Source§type Abi = WasmPtr<WasmRefCell<SigSecretKey>>
type Abi = WasmPtr<WasmRefCell<SigSecretKey>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<SigSecretKey>
type Anchor = RcRefMut<SigSecretKey>
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 SigSecretKey
impl Serialize for SigSecretKey
impl SupportsConstructor for SigSecretKey
impl SupportsInstanceProperty for SigSecretKey
impl SupportsStaticProperty for SigSecretKey
Source§impl TryFromJsValue for SigSecretKey
impl TryFromJsValue for SigSecretKey
Source§impl VectorFromWasmAbi for SigSecretKey
impl VectorFromWasmAbi for SigSecretKey
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[SigSecretKey]>
Source§impl VectorIntoWasmAbi for SigSecretKey
impl VectorIntoWasmAbi for SigSecretKey
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[SigSecretKey]>) -> Self::Abi
Source§impl WasmDescribeVector for SigSecretKey
impl WasmDescribeVector for SigSecretKey
Auto Trait Implementations§
impl Freeze for SigSecretKey
impl RefUnwindSafe for SigSecretKey
impl Send for SigSecretKey
impl Sync for SigSecretKey
impl Unpin for SigSecretKey
impl UnsafeUnpin for SigSecretKey
impl UnwindSafe for SigSecretKey
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.