mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-09 21:10:44 +00:00
ed: Add SigningKey::as_bytes (#561)
Allows to get a reference to the secret bytes without making a copy.
This commit is contained in:
parent
b93ace8c7f
commit
098658dc8b
1 changed files with 6 additions and 0 deletions
|
|
@ -110,6 +110,12 @@ impl SigningKey {
|
||||||
self.secret_key
|
self.secret_key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Convert this [`SigningKey`] into a [`SecretKey`] reference
|
||||||
|
#[inline]
|
||||||
|
pub fn as_bytes(&self) -> &SecretKey {
|
||||||
|
&self.secret_key
|
||||||
|
}
|
||||||
|
|
||||||
/// Construct a [`SigningKey`] from the bytes of a `VerifyingKey` and `SecretKey`.
|
/// Construct a [`SigningKey`] from the bytes of a `VerifyingKey` and `SecretKey`.
|
||||||
///
|
///
|
||||||
/// # Inputs
|
/// # Inputs
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue