mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
Add as_bytes() method
This commit is contained in:
parent
53bb1a3989
commit
50dbb9eb4d
1 changed files with 5 additions and 0 deletions
|
|
@ -190,6 +190,11 @@ impl StaticSecret {
|
||||||
pub fn to_bytes(&self) -> [u8; 32] {
|
pub fn to_bytes(&self) -> [u8; 32] {
|
||||||
self.0.to_bytes()
|
self.0.to_bytes()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// View this key as a byte array.
|
||||||
|
pub fn as_bytes(&self) -> &[u8; 32] {
|
||||||
|
self.0.as_bytes()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<[u8; 32]> for StaticSecret {
|
impl From<[u8; 32]> for StaticSecret {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue