[][src]Enum did_key::DIDKey

pub enum DIDKey {
    Ed25519(Ed25519KeyPair),
    X25519(X25519Key),
    P256(P256Key),
    Bls12381G1(Bls12381KeyPair),
    Bls12381G2(Bls12381KeyPair),
}

Variants

X25519(X25519Key)
P256(P256Key)
Bls12381G1(Bls12381KeyPair)
Bls12381G2(Bls12381KeyPair)

Implementations

impl DIDKey[src]

pub fn resolve(did_uri: &str) -> Result<DIDKey, String>[src]

pub fn fingerprint(&self) -> String[src]

pub fn new(key_type: DIDKeyType) -> Self[src]

pub fn new_from_seed(key_type: DIDKeyType, seed: &[u8]) -> Self[src]

pub fn from_public_key(key_type: DIDKeyType, seed: &[u8]) -> DIDKey[src]

pub fn key_exchange(&self, key: &Self) -> Vec<u8>[src]

pub fn sign(&self, payload: Payload) -> Vec<u8>[src]

pub fn verify(&self, payload: Payload, signature: &Vec<u8>) -> bool[src]

pub fn public_key(&self) -> Vec<u8>[src]

pub fn secret_key(&self) -> Option<Vec<u8>>[src]

Trait Implementations

impl TryFrom<String> for DIDKey[src]

type Error = String

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for DIDKey

impl Send for DIDKey

impl Sync for DIDKey

impl Unpin for DIDKey

impl UnwindSafe for DIDKey

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,