pub struct DIDKeyGenerator;Expand description
DID Key Generator for creating DIDs with different key types
Implementations§
Source§impl DIDKeyGenerator
impl DIDKeyGenerator
Sourcepub fn create_secret_from_key(&self, key: &GeneratedKey) -> Secret
pub fn create_secret_from_key(&self, key: &GeneratedKey) -> Secret
Create a Secret from a GeneratedKey for a DID
Sourcepub fn generate_did(
&self,
options: DIDGenerationOptions,
) -> Result<GeneratedKey>
pub fn generate_did( &self, options: DIDGenerationOptions, ) -> Result<GeneratedKey>
Generate a did:key identifier with the specified key type
Sourcepub fn generate_ed25519_did(&self) -> Result<GeneratedKey>
pub fn generate_ed25519_did(&self) -> Result<GeneratedKey>
Generate a did:key identifier with an Ed25519 key
Sourcepub fn generate_p256_did(&self) -> Result<GeneratedKey>
pub fn generate_p256_did(&self) -> Result<GeneratedKey>
Generate a did:key identifier with a P-256 key
Sourcepub fn generate_secp256k1_did(&self) -> Result<GeneratedKey>
pub fn generate_secp256k1_did(&self) -> Result<GeneratedKey>
Generate a did:key identifier with a Secp256k1 key
Sourcepub fn generate_web_did(
&self,
domain: &str,
options: DIDGenerationOptions,
) -> Result<GeneratedKey>
pub fn generate_web_did( &self, domain: &str, options: DIDGenerationOptions, ) -> Result<GeneratedKey>
Generate a did:web identifier with the given domain and key type
Trait Implementations§
Source§impl Clone for DIDKeyGenerator
impl Clone for DIDKeyGenerator
Source§fn clone(&self) -> DIDKeyGenerator
fn clone(&self) -> DIDKeyGenerator
Returns a duplicate of the value. Read more
1.0.0 · 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 DIDKeyGenerator
impl Debug for DIDKeyGenerator
Source§impl Default for DIDKeyGenerator
impl Default for DIDKeyGenerator
Source§fn default() -> DIDKeyGenerator
fn default() -> DIDKeyGenerator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DIDKeyGenerator
impl RefUnwindSafe for DIDKeyGenerator
impl Send for DIDKeyGenerator
impl Sync for DIDKeyGenerator
impl Unpin for DIDKeyGenerator
impl UnsafeUnpin for DIDKeyGenerator
impl UnwindSafe for DIDKeyGenerator
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