Make from_bytes() for keys public.

This commit is contained in:
Isis Lovecruft 2017-03-14 21:49:07 +00:00
parent 9dc9bbed4e
commit 5a30f4eb0f
Failed to extract signature

View file

@ -133,8 +133,7 @@ impl SecretKey {
///
/// A `SecretKey`.
#[inline]
#[allow(dead_code)]
fn from_bytes(bytes: &[u8]) -> SecretKey {
pub fn from_bytes(bytes: &[u8]) -> SecretKey {
SecretKey(*array_ref!(bytes, 0, 64))
}
@ -229,8 +228,7 @@ impl PublicKey {
///
/// A `PublicKey`.
#[inline]
#[allow(dead_code)]
fn from_bytes(bytes: &[u8]) -> PublicKey {
pub fn from_bytes(bytes: &[u8]) -> PublicKey {
PublicKey(CompressedEdwardsY(*array_ref!(bytes, 0, 32)))
}