Struct parity_crypto::publickey::ZeroesAllowedMessage
source · [−]pub struct ZeroesAllowedMessage(pub H256);
Expand description
In ethereum we allow public key recovery from a signature + message pair
where the message is all-zeroes. This conflicts with the best practise of
not allowing such values and so in order to avoid breaking consensus we need
this to work around it. The ZeroesAllowedType
wraps an H256
that can be
converted to a [u8; 32]
which in turn can be cast to a
secp256k1::Message
by the ThirtyTwoByteHash
and satisfy the API for
recover()
.
Tuple Fields
0: H256
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ZeroesAllowedMessage
impl Send for ZeroesAllowedMessage
impl Sync for ZeroesAllowedMessage
impl Unpin for ZeroesAllowedMessage
impl UnwindSafe for ZeroesAllowedMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more