pub enum AlgorithmInstance {
Show 21 variants
HS256,
HS384,
HS512,
RS256,
RS384,
RS512,
PS256,
PS384,
PS512,
EdDSA,
EdBlake2b,
ES256,
ES384,
ES256K,
ES256KR,
ESKeccakK,
ESKeccakKR,
ESBlake2b,
ESBlake2bK,
Bbs(BbsInstance),
None,
// some variants omitted
}
Variants§
HS256
HMAC using SHA-256.
HS384
HMAC using SHA-384.
HS512
HMAC using SHA-512.
RS256
RSASSA-PKCS1-v1_5 using SHA-256.
RS384
RSASSA-PKCS1-v1_5 using SHA-384.
RS512
RSASSA-PKCS1-v1_5 using SHA-512.
PS256
RSASSA-PSS using SHA-256 and MGF1 with SHA-256.
PS384
RSASSA-PSS using SHA-384 and MGF1 with SHA-384.
PS512
RSASSA-PSS using SHA-512 and MGF1 with SHA-512.
EdDSA
Edwards-curve Digital Signature Algorithm (EdDSA) using SHA-256.
The following curves are defined for use with EdDSA
:
Ed25519
Ed448
EdBlake2b
EdDSA using SHA-256 and Blake2b as pre-hash function.
ES256
ECDSA using P-256 and SHA-256.
ES384
ECDSA using P-384 and SHA-384.
ES256K
ECDSA using secp256k1 (K-256) and SHA-256.
ES256KR
ECDSA using secp256k1 (K-256) and SHA-256 with a recovery bit.
ES256K-R
is similar to ES256K
with the recovery bit appended, making
the signature 65 bytes instead of 64. The recovery bit is used to
extract the public key from the signature.
See: https://github.com/decentralized-identity/EcdsaSecp256k1RecoverySignature2020#es256k-r
ESKeccakK
ECDSA using secp256k1 (K-256) and Keccak-256.
Like ES256K
but using Keccak-256 instead of SHA-256.
ESKeccakKR
ECDSA using secp256k1 (K-256) and Keccak-256 with a recovery bit.
Like ES256K-R
but using Keccak-256 instead of SHA-256.
ESBlake2b
ECDSA using P-256 and Blake2b.
ESBlake2bK
ECDSA using secp256k1 (K-256) and Blake2b.
Bbs(BbsInstance)
BBS scheme.
None
No signature
Implementations§
Trait Implementations§
Source§impl Clone for AlgorithmInstance
impl Clone for AlgorithmInstance
Source§fn clone(&self) -> AlgorithmInstance
fn clone(&self) -> AlgorithmInstance
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AlgorithmInstance
impl Debug for AlgorithmInstance
Source§impl From<AleoTestnet1Signature> for AlgorithmInstance
impl From<AleoTestnet1Signature> for AlgorithmInstance
Source§fn from(_: AleoTestnet1Signature) -> Self
fn from(_: AleoTestnet1Signature) -> Self
Source§impl From<AnyBlake2b> for AlgorithmInstance
impl From<AnyBlake2b> for AlgorithmInstance
Source§fn from(value: AnyBlake2b) -> Self
fn from(value: AnyBlake2b) -> Self
Source§impl From<AnyESKeccakK> for AlgorithmInstance
impl From<AnyESKeccakK> for AlgorithmInstance
Source§fn from(value: AnyESKeccakK) -> Self
fn from(value: AnyESKeccakK) -> Self
Source§impl From<BbsInstance> for AlgorithmInstance
impl From<BbsInstance> for AlgorithmInstance
Source§fn from(value: BbsInstance) -> Self
fn from(value: BbsInstance) -> Self
Source§impl From<ES256> for AlgorithmInstance
impl From<ES256> for AlgorithmInstance
Source§impl From<ES256K> for AlgorithmInstance
impl From<ES256K> for AlgorithmInstance
Source§impl From<ES256KR> for AlgorithmInstance
impl From<ES256KR> for AlgorithmInstance
Source§impl From<ES256OrES384> for AlgorithmInstance
impl From<ES256OrES384> for AlgorithmInstance
Source§fn from(value: ES256OrES384) -> Self
fn from(value: ES256OrES384) -> Self
Source§impl From<ES384> for AlgorithmInstance
impl From<ES384> for AlgorithmInstance
Source§impl From<ESBlake2b> for AlgorithmInstance
impl From<ESBlake2b> for AlgorithmInstance
Source§impl From<ESBlake2bK> for AlgorithmInstance
impl From<ESBlake2bK> for AlgorithmInstance
Source§fn from(_: ESBlake2bK) -> Self
fn from(_: ESBlake2bK) -> Self
Source§impl From<ESKeccakK> for AlgorithmInstance
impl From<ESKeccakK> for AlgorithmInstance
Source§impl From<ESKeccakKR> for AlgorithmInstance
impl From<ESKeccakKR> for AlgorithmInstance
Source§fn from(_: ESKeccakKR) -> Self
fn from(_: ESKeccakKR) -> Self
Source§impl From<EdBlake2b> for AlgorithmInstance
impl From<EdBlake2b> for AlgorithmInstance
Source§impl From<EdDSA> for AlgorithmInstance
impl From<EdDSA> for AlgorithmInstance
Source§impl From<HS256> for AlgorithmInstance
impl From<HS256> for AlgorithmInstance
Source§impl From<HS384> for AlgorithmInstance
impl From<HS384> for AlgorithmInstance
Source§impl From<HS512> for AlgorithmInstance
impl From<HS512> for AlgorithmInstance
Source§impl From<PS256> for AlgorithmInstance
impl From<PS256> for AlgorithmInstance
Source§impl From<PS384> for AlgorithmInstance
impl From<PS384> for AlgorithmInstance
Source§impl From<PS512> for AlgorithmInstance
impl From<PS512> for AlgorithmInstance
Source§impl From<RS256> for AlgorithmInstance
impl From<RS256> for AlgorithmInstance
Source§impl From<RS384> for AlgorithmInstance
impl From<RS384> for AlgorithmInstance
Source§impl From<RS512> for AlgorithmInstance
impl From<RS512> for AlgorithmInstance
Source§impl TryFrom<AlgorithmInstance> for AleoTestnet1Signature
impl TryFrom<AlgorithmInstance> for AleoTestnet1Signature
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for AnyBlake2b
impl TryFrom<AlgorithmInstance> for AnyBlake2b
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for BbsInstance
impl TryFrom<AlgorithmInstance> for BbsInstance
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for ES256
impl TryFrom<AlgorithmInstance> for ES256
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for ES256K
impl TryFrom<AlgorithmInstance> for ES256K
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for ES256KR
impl TryFrom<AlgorithmInstance> for ES256KR
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for ES384
impl TryFrom<AlgorithmInstance> for ES384
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for ESBlake2b
impl TryFrom<AlgorithmInstance> for ESBlake2b
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for ESBlake2bK
impl TryFrom<AlgorithmInstance> for ESBlake2bK
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for ESKeccakK
impl TryFrom<AlgorithmInstance> for ESKeccakK
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for ESKeccakKR
impl TryFrom<AlgorithmInstance> for ESKeccakKR
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for EdBlake2b
impl TryFrom<AlgorithmInstance> for EdBlake2b
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for EdDSA
impl TryFrom<AlgorithmInstance> for EdDSA
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for HS256
impl TryFrom<AlgorithmInstance> for HS256
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for HS384
impl TryFrom<AlgorithmInstance> for HS384
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for HS512
impl TryFrom<AlgorithmInstance> for HS512
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for PS256
impl TryFrom<AlgorithmInstance> for PS256
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for PS384
impl TryFrom<AlgorithmInstance> for PS384
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for PS512
impl TryFrom<AlgorithmInstance> for PS512
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for RS256
impl TryFrom<AlgorithmInstance> for RS256
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for RS384
impl TryFrom<AlgorithmInstance> for RS384
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Source§impl TryFrom<AlgorithmInstance> for RS512
impl TryFrom<AlgorithmInstance> for RS512
Source§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Auto Trait Implementations§
impl Freeze for AlgorithmInstance
impl RefUnwindSafe for AlgorithmInstance
impl Send for AlgorithmInstance
impl Sync for AlgorithmInstance
impl Unpin for AlgorithmInstance
impl UnwindSafe for AlgorithmInstance
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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