mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-07 20:50:39 +00:00
Make from_bytes() for keys public.
This commit is contained in:
parent
9dc9bbed4e
commit
5a30f4eb0f
1 changed files with 2 additions and 4 deletions
|
|
@ -133,8 +133,7 @@ impl SecretKey {
|
||||||
///
|
///
|
||||||
/// A `SecretKey`.
|
/// A `SecretKey`.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(dead_code)]
|
pub fn from_bytes(bytes: &[u8]) -> SecretKey {
|
||||||
fn from_bytes(bytes: &[u8]) -> SecretKey {
|
|
||||||
SecretKey(*array_ref!(bytes, 0, 64))
|
SecretKey(*array_ref!(bytes, 0, 64))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -229,8 +228,7 @@ impl PublicKey {
|
||||||
///
|
///
|
||||||
/// A `PublicKey`.
|
/// A `PublicKey`.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(dead_code)]
|
pub fn from_bytes(bytes: &[u8]) -> PublicKey {
|
||||||
fn from_bytes(bytes: &[u8]) -> PublicKey {
|
|
||||||
PublicKey(CompressedEdwardsY(*array_ref!(bytes, 0, 32)))
|
PublicKey(CompressedEdwardsY(*array_ref!(bytes, 0, 32)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue