keyfork-derive-util: make private and public test keys more visible

This commit is contained in:
Ryan Heywood 2024-04-14 21:26:44 -04:00
parent 08a66e2365
commit 61871a77f0
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
2 changed files with 5 additions and 1 deletions

View File

@ -180,6 +180,8 @@ impl PrivateKey for ed25519_dalek::SigningKey {
use crate::public_key::TestPublicKey;
/// A private key that can be used for testing purposes. Does not utilize any significant
/// cryptographic operations.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct TestPrivateKey {
key: [u8; 32],

View File

@ -142,13 +142,15 @@ impl PublicKey for VerifyingKey {
}
}
/// A public key that can be used for testing purposes. Does not utilize any significant
/// cryptographic operations.
#[derive(Clone)]
pub struct TestPublicKey {
pub(crate) key: [u8; 33],
}
impl TestPublicKey {
#[doc(hidden)]
/// Create a new TestPublicKey from the given bytes.
#[allow(dead_code)]
pub fn from_bytes(b: &[u8]) -> Self {
Self {