gossamer/crypto_key

Types

A cryptographic key used with subtle_crypto operations (encryption, signing, key derivation, etc.).

See CryptoKey on MDN.

pub type CryptoKey
pub type Fields {
  Fields(
    algorithm: KeyAlgorithm,
    is_extractable: Bool,
    type_: key_type.KeyType,
    usages: List(key_usage.KeyUsage),
  )
}

Constructors

pub type KeyAlgorithm {
  Aes(name: aes_algorithm.AesAlgorithm, length: Int)
  Ec(
    name: ec_algorithm.EcAlgorithm,
    named_curve: named_curve.NamedCurve,
  )
  Hmac(hash: hash_algorithm.HashAlgorithm, length: Int)
  Rsa(
    name: rsa_algorithm.RsaAlgorithm,
    modulus_length: Int,
    public_exponent: uint8_array.Uint8Array,
    hash: hash_algorithm.HashAlgorithm,
  )
}

Constructors

Values

pub fn algorithm(of key: CryptoKey) -> KeyAlgorithm
pub fn is_extractable(key: CryptoKey) -> Bool
pub fn to_fields(key: CryptoKey) -> Fields
pub fn type_(of key: CryptoKey) -> key_type.KeyType
pub fn usages(of key: CryptoKey) -> List(key_usage.KeyUsage)
Search Document