mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-06 20:20:39 +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
|
||||
}
|
||||
|
||||
/// 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`.
|
||||
///
|
||||
/// # Inputs
|
||||
|
|
|
|||
Loading…
Reference in a new issue