pub struct ValidatableEd25519Signature {
key: PublicKey,
sig: Signature,
entire_text_of_signed_thing: Vec<u8>,
}
Expand description
An ed25519 signature, plus the document that it signs and its public key.
Fields§
§key: PublicKey
The key that allegedly produced the signature
sig: Signature
The alleged signature
entire_text_of_signed_thing: Vec<u8>
The entire body of text that is allegedly signed here.
TODO: It’s not so good to have this included here; it would be better to have a patch to ed25519_dalek to allow us to pre-hash the signed thing, and just store a digest. We can’t use that with the ‘prehash’ variant of ed25519, since that has different constants.
Implementations§
Trait Implementations§
Source§impl Clone for ValidatableEd25519Signature
impl Clone for ValidatableEd25519Signature
Source§fn clone(&self) -> ValidatableEd25519Signature
fn clone(&self) -> ValidatableEd25519Signature
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ValidatableEd25519Signature
impl Debug for ValidatableEd25519Signature
Source§impl HasMemoryCostStructural for ValidatableEd25519Signature
impl HasMemoryCostStructural for ValidatableEd25519Signature
Source§fn indirect_memory_cost(&self, et: EnabledToken) -> usize
fn indirect_memory_cost(&self, et: EnabledToken) -> usize
Memory cost of data stored out-of-line Read more
Source§impl ValidatableSignature for ValidatableEd25519Signature
impl ValidatableSignature for ValidatableEd25519Signature
Source§fn is_valid(&self) -> bool
fn is_valid(&self) -> bool
Check whether this signature is a correct signature for the document.
Source§fn as_ed25519(&self) -> Option<&ValidatableEd25519Signature>
fn as_ed25519(&self) -> Option<&ValidatableEd25519Signature>
Return this value as a validatable Ed25519 signature, if it is one.
Auto Trait Implementations§
impl Freeze for ValidatableEd25519Signature
impl RefUnwindSafe for ValidatableEd25519Signature
impl Send for ValidatableEd25519Signature
impl Sync for ValidatableEd25519Signature
impl Unpin for ValidatableEd25519Signature
impl UnwindSafe for ValidatableEd25519Signature
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> HasMemoryCost for Twhere
T: HasMemoryCostStructural,
impl<T> HasMemoryCost for Twhere
T: HasMemoryCostStructural,
§fn memory_cost(&self, et: EnabledToken) -> usize
fn memory_cost(&self, et: EnabledToken) -> usize
Returns the memory cost of
self
, in bytes Read more§impl<T> HasTypedMemoryCost<T> for Twhere
T: HasMemoryCost,
impl<T> HasTypedMemoryCost<T> for Twhere
T: HasMemoryCost,
§fn typed_memory_cost(&self, enabled: EnabledToken) -> TypedMemoryCost<T>
fn typed_memory_cost(&self, enabled: EnabledToken) -> TypedMemoryCost<T>
The cost, as a
TypedMemoryCost<T>
rather than a raw usize
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more