mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
Add DecafPoint.to_bytes().
This commit is contained in:
parent
fa481903d3
commit
2d15619c6c
1 changed files with 5 additions and 0 deletions
|
|
@ -59,6 +59,11 @@ pub struct CompressedDecaf(pub [u8; 32]);
|
||||||
|
|
||||||
/// The result of compressing a `DecafPoint`.
|
/// The result of compressing a `DecafPoint`.
|
||||||
impl CompressedDecaf {
|
impl CompressedDecaf {
|
||||||
|
/// Convert this `CompressedDecaf` to an array of bytes.
|
||||||
|
pub fn to_bytes(&self) -> [u8; 32] {
|
||||||
|
self.0
|
||||||
|
}
|
||||||
|
|
||||||
/// View this `CompressedDecaf` as an array of bytes.
|
/// View this `CompressedDecaf` as an array of bytes.
|
||||||
pub fn as_bytes<'a>(&'a self) -> &'a [u8; 32] {
|
pub fn as_bytes<'a>(&'a self) -> &'a [u8; 32] {
|
||||||
&self.0
|
&self.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue