[−][src]Struct signatory::ecdsa::SecretKey
Elliptic curve secret keys.
This type wraps a secret scalar value, helping to prevent accidental
exposure and securely erasing the value from memory when dropped
(when the zeroize
feature of this crate is enabled).
Implementations
impl<C> SecretKey<C> where
C: Curve + SecretValue,
<C as SecretValue>::Secret: Clone,
<C as SecretValue>::Secret: Zeroize,
GenericArray<u8, <C as Curve>::FieldSize>: From<<C as SecretValue>::Secret>,
[src]
C: Curve + SecretValue,
<C as SecretValue>::Secret: Clone,
<C as SecretValue>::Secret: Zeroize,
GenericArray<u8, <C as Curve>::FieldSize>: From<<C as SecretValue>::Secret>,
pub fn new(secret_value: <C as SecretValue>::Secret) -> SecretKey<C>
[src]
Create a new secret key from a serialized scalar value
pub fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<SecretKey<C>, Error>
[src]
Deserialize this secret key from a bytestring
pub fn to_bytes(&self) -> GenericArray<u8, <C as Curve>::FieldSize>
[src]
Expose the byte serialization of the value this SecretKey
wraps
Trait Implementations
impl<C> Clone for SecretKey<C> where
C: SecretValue + Curve + Clone,
<C as SecretValue>::Secret: Clone,
[src]
C: SecretValue + Curve + Clone,
<C as SecretValue>::Secret: Clone,
impl<C> Debug for SecretKey<C> where
C: Curve + SecretValue,
[src]
C: Curve + SecretValue,
impl<C> Drop for SecretKey<C> where
C: Curve + SecretValue,
[src]
C: Curve + SecretValue,
impl<'_, C> TryFrom<&'_ [u8]> for SecretKey<C> where
C: Curve + SecretValue,
<C as SecretValue>::Secret: Clone,
<C as SecretValue>::Secret: Zeroize,
GenericArray<u8, <C as Curve>::FieldSize>: From<<C as SecretValue>::Secret>,
[src]
C: Curve + SecretValue,
<C as SecretValue>::Secret: Clone,
<C as SecretValue>::Secret: Zeroize,
GenericArray<u8, <C as Curve>::FieldSize>: From<<C as SecretValue>::Secret>,
Auto Trait Implementations
impl<C> RefUnwindSafe for SecretKey<C> where
<C as SecretValue>::Secret: RefUnwindSafe,
<C as SecretValue>::Secret: RefUnwindSafe,
impl<C> Send for SecretKey<C> where
<C as SecretValue>::Secret: Send,
<C as SecretValue>::Secret: Send,
impl<C> Sync for SecretKey<C> where
<C as SecretValue>::Secret: Sync,
<C as SecretValue>::Secret: Sync,
impl<C> Unpin for SecretKey<C> where
<C as SecretValue>::Secret: Unpin,
<C as SecretValue>::Secret: Unpin,
impl<C> UnwindSafe for SecretKey<C> where
<C as SecretValue>::Secret: UnwindSafe,
<C as SecretValue>::Secret: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,