WebCrypto¶
The WebCrypto provider wraps the W3C WebCrypto API and is the default for JS and WASM targets.
Suspend functions only
The WebCrypto API is asynchronous by default. Because of this, the WebCrypto provider only supports
suspend functions. Calling Blocking variants (e.g., encryptBlocking(), generateKeyBlocking())
will throw an exception.
Using in your projects¶
dependencies {
implementation("dev.whyoleg.cryptography:cryptography-provider-webcrypto:0.6.0")
}
Access via CryptographyProvider.WebCrypto (available on js, wasmJs targets).
See the algorithm support tables for specific limitations and Working with Keys for key format restrictions.