zk-token_sdk: define defaults for pod ElGamal/AES ciphertexts (#22532)
This commit is contained in:
parent
a2d251ce1e
commit
41fb98c771
|
@ -19,7 +19,7 @@ impl fmt::Debug for ElGamalCiphertext {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Pod, Zeroable, PartialEq)]
|
#[derive(Clone, Copy, Default, Pod, Zeroable, PartialEq)]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
pub struct ElGamalPubkey(pub [u8; 32]);
|
pub struct ElGamalPubkey(pub [u8; 32]);
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ impl fmt::Debug for ElGamalPubkey {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Pod, Zeroable, PartialEq)]
|
#[derive(Clone, Copy, Default, Pod, Zeroable, PartialEq)]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
pub struct PedersenCommitment(pub [u8; 32]);
|
pub struct PedersenCommitment(pub [u8; 32]);
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ impl fmt::Debug for PedersenCommitment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Pod, Zeroable, PartialEq)]
|
#[derive(Clone, Copy, Default, Pod, Zeroable, PartialEq)]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
pub struct PedersenDecryptHandle(pub [u8; 32]);
|
pub struct PedersenDecryptHandle(pub [u8; 32]);
|
||||||
|
|
||||||
|
@ -114,3 +114,9 @@ impl fmt::Debug for AeCiphertext {
|
||||||
write!(f, "{:?}", self.0)
|
write!(f, "{:?}", self.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for AeCiphertext {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::zeroed()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue