pub struct SecretKeyWrapper(/* private fields */);
Expand description
Wrapper around [fuel_crypto::SecretKey
] to implement secrecy
marker traits
Methods from Deref<Target = SecretKey>§
pub const LEN: usize = 32usize
Sourcepub fn is_in_field(&self) -> bool
pub fn is_in_field(&self) -> bool
Check if the secret key representation fits the scalar field.
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
Return the curve representation of this secret.
The discrete logarithm property guarantees this is a one-way function.
Trait Implementations§
Source§impl Clone for SecretKeyWrapper
impl Clone for SecretKeyWrapper
Source§fn clone(&self) -> SecretKeyWrapper
fn clone(&self) -> SecretKeyWrapper
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl DebugSecret for SecretKeyWrapper
impl DebugSecret for SecretKeyWrapper
Source§impl Default for SecretKeyWrapper
impl Default for SecretKeyWrapper
Source§fn default() -> SecretKeyWrapper
fn default() -> SecretKeyWrapper
Returns the “default value” for a type. Read more
Source§impl Deref for SecretKeyWrapper
impl Deref for SecretKeyWrapper
Source§impl From<SecretKey> for SecretKeyWrapper
impl From<SecretKey> for SecretKeyWrapper
Source§fn from(original: SecretKey) -> SecretKeyWrapper
fn from(original: SecretKey) -> SecretKeyWrapper
Converts to this type from the input type.
Source§impl Hash for SecretKeyWrapper
impl Hash for SecretKeyWrapper
Source§impl Ord for SecretKeyWrapper
impl Ord for SecretKeyWrapper
Source§fn cmp(&self, other: &SecretKeyWrapper) -> Ordering
fn cmp(&self, other: &SecretKeyWrapper) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SecretKeyWrapper
impl PartialEq for SecretKeyWrapper
Source§impl PartialOrd for SecretKeyWrapper
impl PartialOrd for SecretKeyWrapper
Source§impl Zeroize for SecretKeyWrapper
impl Zeroize for SecretKeyWrapper
impl CloneableSecret for SecretKeyWrapper
impl Copy for SecretKeyWrapper
impl Eq for SecretKeyWrapper
impl StructuralPartialEq for SecretKeyWrapper
Auto Trait Implementations§
impl Freeze for SecretKeyWrapper
impl RefUnwindSafe for SecretKeyWrapper
impl Send for SecretKeyWrapper
impl Sync for SecretKeyWrapper
impl Unpin for SecretKeyWrapper
impl UnwindSafe for SecretKeyWrapper
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> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more