webcrypto library

Cryptographic primitives for use on Dart VM and Dart in the browser.

TODO: Finish documentation of a public identifiers, so far the folliwng items have been documented:

Exceptions

This library will throw the following exceptions:

Errors

This library will throw the following errors:

  • ArgumentError, when an parameter is out of range,
  • UnsupportedError, when an operation isn't supported,
  • OperationError, when an operation fails operation specific reason, this typically when the underlying cryptographic library returns an error.

Mapping Web Crypto Error

Classes

AesCbcSecretKey
AES secret key for symmetric encryption and decryption using AES in Cipher Block Chaining mode (CBC-mode), as described in NIST SP800-38A.
AesCtrSecretKey
AES secret key for symmetric encryption and decryption using AES in Counter mode (CTR-mode), as described in NIST SP800-38A.
AesGcmSecretKey
EcdhPrivateKey
EcdhPublicKey
EcdsaPrivateKey
EcdsaPublicKey
Hash
A cryptographic hash algorithm implementation.
HkdfSecretKey
HKDF secret key (or password) for key derivation.
HmacSecretKey
Key for signing/verifying with HMAC.
KeyPair<S, T>
A key-pair as returned from key generation.
Pbkdf2SecretKey
PBKDF2 secret key (or password) for key derivation.
RsaOaepPrivateKey
RSAES-OAEP private key for decryption of messages.
RsaOaepPublicKey
RSAES-OAEP public key for decryption of messages.
RsaPssPrivateKey
RSASSA-PSS private key for signing messages.
RsaPssPublicKey
RSASSA-PSS public key for verifying signatures.
RsassaPkcs1V15PrivateKey
RSASSA-PKCS1-v1_5 private key for signing messages.
RsassaPkcs1V15PublicKey
RSASSA-PKCS1-v1_5 public key for signing messages.

Enums

EllipticCurve
Elliptic curves supported by ECDSA and ECDH.

Functions

fillRandomBytes(TypedData destination) → void
Fill destination with cryptographically random values.

Exceptions / Errors

OperationError
Thrown when an operation failed for an operation-specific reason.