Struct identity_iota::crypto::JcsEd25519
source · [−]Expand description
An implementation of the JCS Ed25519 Signature 2020 signature suite for Linked Data Proofs.
Users should use the Sign
/Verify
traits to access
this implementation.
Trait Implementations
sourceimpl<T> Named for JcsEd25519<T>
impl<T> Named for JcsEd25519<T>
sourceimpl<T> Signer<<T as Sign>::Private> for JcsEd25519<T> where
T: Sign,
<T as Sign>::Output: AsRef<[u8]>,
impl<T> Signer<<T as Sign>::Private> for JcsEd25519<T> where
T: Sign,
<T as Sign>::Output: AsRef<[u8]>,
sourcefn sign<X>(
data: &X,
private: &<T as Sign>::Private
) -> Result<ProofValue, Error> where
X: Serialize,
fn sign<X>(
data: &X,
private: &<T as Sign>::Private
) -> Result<ProofValue, Error> where
X: Serialize,
Signs the given data
and returns a digital signature.
sourcefn create_signature<T>(
data: &mut T,
method: impl Into<String>,
secret: &Secret,
options: ProofOptions
) -> Result<(), Error> where
T: Serialize + SetSignature,
fn create_signature<T>(
data: &mut T,
method: impl Into<String>,
secret: &Secret,
options: ProofOptions
) -> Result<(), Error> where
T: Serialize + SetSignature,
Creates and applies a signature proof to the given data
.
sourceimpl<T> Verifier<<T as Verify>::Public> for JcsEd25519<T> where
T: Verify,
impl<T> Verifier<<T as Verify>::Public> for JcsEd25519<T> where
T: Verify,
sourcefn verify<X>(
data: &X,
signature: &ProofValue,
public: &<T as Verify>::Public
) -> Result<(), Error> where
X: Serialize,
fn verify<X>(
data: &X,
signature: &ProofValue,
public: &<T as Verify>::Public
) -> Result<(), Error> where
X: Serialize,
Verifies the authenticity of data
and signature
.
sourcefn verify_signature<T>(data: &T, public: &Public) -> Result<(), Error> where
T: Serialize + GetSignature,
fn verify_signature<T>(data: &T, public: &Public) -> Result<(), Error> where
T: Serialize + GetSignature,
Extracts and verifies a proof signature from the given data
.
Auto Trait Implementations
impl<T> RefUnwindSafe for JcsEd25519<T> where
T: RefUnwindSafe,
impl<T> Send for JcsEd25519<T> where
T: Send,
impl<T> Sync for JcsEd25519<T> where
T: Sync,
impl<T> Unpin for JcsEd25519<T> where
T: Unpin,
impl<T> UnwindSafe for JcsEd25519<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more