Struct saito_rust::crypto::SecretKey [−]
pub struct SecretKey(_);
Expand description
Secret 256-bit key used as x
in an ECDSA signature
Implementations
impl SecretKey
impl SecretKey
Creates a new random secret key. Requires compilation with the “rand” feature.
Converts a SECRET_KEY_SIZE
-byte slice to a secret key
pub fn negate_assign(&mut self)
pub fn negate_assign(&mut self)
Negates one secret key.
Adds one secret key to another, modulo the curve order. WIll return an error if the resulting key would be invalid or if the tweak was not a 32-byte length slice.
impl SecretKey
impl SecretKey
pub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Converts the object to a mutable raw pointer for FFI interfacing
Trait Implementations
impl CPtr for SecretKey
impl CPtr for SecretKey
impl<'de> Deserialize<'de> for SecretKey
impl<'de> Deserialize<'de> for SecretKey
pub fn deserialize<D>(
d: D
) -> Result<SecretKey, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(
d: D
) -> Result<SecretKey, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl PartialOrd<SecretKey> for SecretKey
impl PartialOrd<SecretKey> for SecretKey
pub fn partial_cmp(&self, other: &SecretKey) -> Option<Ordering>
pub fn partial_cmp(&self, other: &SecretKey) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
pub fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
pub fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for SecretKey
impl UnwindSafe for SecretKey
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more