pub struct Ed25519DidKeyStore { /* private fields */ }Expand description
Production DidKeyStore: Ed25519 signatures, X25519 ECDH, and
ChaCha20-Poly1305 authenticated payload encryption.
Implementations§
Source§impl Ed25519DidKeyStore
impl Ed25519DidKeyStore
Sourcepub fn with_key(self, did: Did, key: Ed25519DidKey) -> Self
pub fn with_key(self, did: Did, key: Ed25519DidKey) -> Self
Add a key pair for a DID.
Sourcepub fn rotate_key(
&mut self,
did: &Did,
key: Ed25519DidKey,
) -> Result<u64, DidError>
pub fn rotate_key( &mut self, did: &Did, key: Ed25519DidKey, ) -> Result<u64, DidError>
Rotate a DID to a new active key version.
Existing non-retired versions remain in the DID document for in-flight envelope verification until explicitly retired.
Sourcepub fn retire_key(&mut self, did: &Did, version: u64) -> Result<(), DidError>
pub fn retire_key(&mut self, did: &Did, version: u64) -> Result<(), DidError>
Retire an old key version.
Retired authentication methods are omitted from newly generated DID documents and are rejected by this store’s verifier.
Trait Implementations§
Source§impl Clone for Ed25519DidKeyStore
impl Clone for Ed25519DidKeyStore
Source§fn clone(&self) -> Ed25519DidKeyStore
fn clone(&self) -> Ed25519DidKeyStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Ed25519DidKeyStore
impl Debug for Ed25519DidKeyStore
Source§impl Default for Ed25519DidKeyStore
impl Default for Ed25519DidKeyStore
Source§fn default() -> Ed25519DidKeyStore
fn default() -> Ed25519DidKeyStore
Returns the “default value” for a type. Read more
Source§impl DidKeyStore for Ed25519DidKeyStore
impl DidKeyStore for Ed25519DidKeyStore
Source§fn sign(&self, signer: &Did, message: &[u8]) -> Result<String, DidError>
fn sign(&self, signer: &Did, message: &[u8]) -> Result<String, DidError>
Sign bytes as
signer.Source§fn verify(
&self,
method: &VerificationMethod,
message: &[u8],
signature: &str,
) -> Result<(), DidError>
fn verify( &self, method: &VerificationMethod, message: &[u8], signature: &str, ) -> Result<(), DidError>
Verify a signature with the public key in
method.Auto Trait Implementations§
impl Freeze for Ed25519DidKeyStore
impl RefUnwindSafe for Ed25519DidKeyStore
impl Send for Ed25519DidKeyStore
impl Sync for Ed25519DidKeyStore
impl Unpin for Ed25519DidKeyStore
impl UnsafeUnpin for Ed25519DidKeyStore
impl UnwindSafe for Ed25519DidKeyStore
Blanket Implementations§
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