mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
Leave a comment explaining why we derive Default.
This commit is contained in:
parent
6513d4980a
commit
81a3d3298b
1 changed files with 3 additions and 3 deletions
|
|
@ -168,7 +168,7 @@ impl<'d> Deserialize<'d> for Signature {
|
||||||
|
|
||||||
/// An EdDSA secret key.
|
/// An EdDSA secret key.
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Default)]
|
#[derive(Default)] // we derive Default in order to use the clear() method in Drop
|
||||||
pub struct SecretKey(pub (crate) [u8; SECRET_KEY_LENGTH]);
|
pub struct SecretKey(pub (crate) [u8; SECRET_KEY_LENGTH]);
|
||||||
|
|
||||||
impl Debug for SecretKey {
|
impl Debug for SecretKey {
|
||||||
|
|
@ -381,7 +381,7 @@ impl<'d> Deserialize<'d> for SecretKey {
|
||||||
// better-designed, Schnorr-based signature scheme, see Trevor Perrin's work on
|
// better-designed, Schnorr-based signature scheme, see Trevor Perrin's work on
|
||||||
// "generalised EdDSA" and "VXEdDSA".
|
// "generalised EdDSA" and "VXEdDSA".
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Default)]
|
#[derive(Default)] // we derive Default in order to use the clear() method in Drop
|
||||||
pub struct ExpandedSecretKey {
|
pub struct ExpandedSecretKey {
|
||||||
pub (crate) key: Scalar,
|
pub (crate) key: Scalar,
|
||||||
pub (crate) nonce: [u8; 32],
|
pub (crate) nonce: [u8; 32],
|
||||||
|
|
@ -914,7 +914,7 @@ impl<'d> Deserialize<'d> for PublicKey {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An ed25519 keypair.
|
/// An ed25519 keypair.
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)] // we derive Default in order to use the clear() method in Drop
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct Keypair {
|
pub struct Keypair {
|
||||||
/// The secret half of this keypair.
|
/// The secret half of this keypair.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue