mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Merge pull request #210 from DebugSteven/default-montgomerypoint
Default & Identity trait for MontgomeryPoint
This commit is contained in:
commit
55b96aab6d
1 changed files with 6 additions and 0 deletions
|
|
@ -76,6 +76,12 @@ impl ConstantTimeEq for MontgomeryPoint {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for MontgomeryPoint {
|
||||
fn default() -> MontgomeryPoint {
|
||||
MontgomeryPoint([0u8; 32])
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq for MontgomeryPoint {
|
||||
fn eq(&self, other: &MontgomeryPoint) -> bool {
|
||||
self.ct_eq(other).unwrap_u8() == 1u8
|
||||
|
|
|
|||
Loading…
Reference in a new issue