[−][src]Struct ed25519_compact::SecretKey
A secret key.
Implementations
impl SecretKey
[src]
pub const BYTES: usize
[src]
Number of bytes in a secret key.
pub fn new(sk: [u8; 64]) -> Self
[src]
Creates a secret key from raw bytes.
pub fn from_slice(sk: &[u8]) -> Result<Self, Error>
[src]
Creates a secret key from a slice.
pub fn public_key(&self) -> PublicKey
[src]
Returns the public counterpart of a secret key.
impl SecretKey
[src]
pub fn sign(&self, message: impl AsRef<[u8]>, noise: Option<Noise>) -> Signature
[src]
Computes a signature for the message message
using the secret key.
The noise parameter is optional, but recommended in order to mitigate fault attacks.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,