Expand description
WebCrypto API Compatibility Layer
This module provides compatibility with the W3C WebCrypto API standard, enabling interoperability between Rust cryptographic operations and browser-based WebCrypto operations.
§Examples
use chie_crypto::webcrypto::{WebCryptoKey, Algorithm, KeyUsage};
use chie_crypto::signing::KeyPair;
// Create a WebCrypto-compatible key
let keypair = KeyPair::generate();
let web_key = WebCryptoKey::from_ed25519_keypair(&keypair, &[KeyUsage::Sign]);
// Export to JWK (WebCrypto standard format)
let jwk = web_key.to_jwk().unwrap();Structs§
- WebCrypto
Key - WebCrypto-compatible key
- WebCrypto
KeyPair - WebCrypto key pair (for asymmetric algorithms)
Enums§
- Algorithm
- WebCrypto algorithm identifiers
- KeyType
- WebCrypto key type
- KeyUsage
- WebCrypto key usage flags
- WebCrypto
Error - WebCrypto API errors
Type Aliases§
- WebCrypto
Result - Result type for WebCrypto operations