mirror of
https://github.com/dalek-cryptography/ed25519-dalek.git
synced 2026-01-10 11:37:58 -05:00
Merge remote-tracking branch 'garious/add-as-ref' into develop
This commit is contained in:
@@ -183,6 +183,12 @@ impl Drop for SecretKey {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<[u8]> for SecretKey {
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
self.as_bytes()
|
||||
}
|
||||
}
|
||||
|
||||
impl SecretKey {
|
||||
/// Expand this `SecretKey` into an `ExpandedSecretKey`.
|
||||
pub fn expand<D>(&self) -> ExpandedSecretKey
|
||||
@@ -715,6 +721,12 @@ impl Debug for PublicKey {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<[u8]> for PublicKey {
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
self.as_bytes()
|
||||
}
|
||||
}
|
||||
|
||||
impl PublicKey {
|
||||
/// Convert this public key to a byte array.
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user