gossamer/crypto/key
A CryptoKey returned by a gossamer/crypto/subtle
operation. Access its component data via info.
Types
A cryptographic key used with subtle operations (encryption,
signing, key derivation, etc.).
See CryptoKey on MDN.
pub type CryptoKey
A snapshot of a CryptoKey’s parameters, returned
by info. All fields are immutable after key
generation.
pub type Info {
Info(
algorithm: crypto.KeyAlgorithm,
kind: crypto.KeyKind,
usages: List(crypto.KeyUsage),
extractable: Bool,
)
}
Constructors
-
Info( algorithm: crypto.KeyAlgorithm, kind: crypto.KeyKind, usages: List(crypto.KeyUsage), extractable: Bool, )Arguments
- algorithm
-
The algorithm and parameters the key is bound to.
- kind
-
Whether the key is
Secret(symmetric),Public, orPrivate. Equivalent to JavaScript’sCryptoKey.type. - usages
-
The operations the key is permitted for (encrypt, decrypt, sign, verify, etc.).
subtleoperations check this list before running. - extractable
-
Trueif the key can be exported viasubtle.export_keyorsubtle.export_key_jwk.