Expand description
WebAssembly bindings for lib-Q
This module provides JavaScript-compatible bindings for use in web applications. It integrates with the new modular architecture and provides comprehensive cryptographic functionality for web environments.
Modules§
- contexts
- WASM-compatible context wrappers
- conversions
- WASM conversion helpers between Rust buffers and JavaScript
js_sys::Uint8Array. - error
- WASM Error Handling Module
- providers
- WASM-compatible provider bindings
- secure_
contexts - Secure WASM Contexts
- utils
- WASM utility functions
Structs§
- Secure
Wasm Aead Context - Secure WASM AEAD Context
- Secure
Wasm Hash Context - Secure WASM Hash Context
- Secure
Wasm KemContext - Secure WASM KEM Context
- Secure
Wasm Signature Context - Secure WASM Signature Context
- Wasm
Aead Context - WASM-compatible AEAD context wrapper
- Wasm
Conversions - Byte-array conversion helpers for WASM bindings.
- Wasm
Crypto Provider - WASM-compatible CryptoProvider wrapper
- Wasm
Hash Context - WASM-compatible Hash context wrapper
- Wasm
KemContext - WASM-compatible KEM context wrapper
- Wasm
Provider Factory - WASM-compatible provider factory
- Wasm
Provider Manager - WASM-compatible provider manager
- Wasm
Signature Context - WASM-compatible Signature context wrapper
Constants§
- WASM_
SIGNATURE_ ALGORITHM_ IDS - Canonical WASM signature algorithm id strings for listings (
WasmSignatureContext,WasmProviderManager, JSON summaries). MatchesWasmConversions::algorithm_to_stringfor SLH.
Functions§
- bytes_
to_ hex - Convert bytes to hexadecimal string
- bytes_
to_ hex_ wasm - Convert bytes to hexadecimal string
- convert_
result - Helper function to convert Result<T, Error> to Result<T, JsValue>
- create_
aead_ context - Create an AEAD context for WASM backed by
lib-q-aead(same wiring aslibq::aead::context). - create_
hash_ context - Create a new Hash context for WASM backed by
lib-q-hash(same wiring ascrate::create_hash_context). - create_
kem_ context - Create a new KEM context for WASM
- create_
provider_ manager - Create a new provider manager for WASM
- create_
signature_ context - Create a new Signature context for WASM backed by
lib-q-sig(same wiring as nativeSignatureContextwithLibQSignatureProvider). - error_
to_ js_ value - Convert Error to JsValue for WASM compatibility
- generate_
random_ bytes - Generate secure random bytes for WASM
- get_
library_ info - Get library information for WASM
- get_
library_ info_ wasm - Get library information for WASM
- get_
performance_ benchmarks_ wasm - Get performance benchmarks
- get_
security_ recommendations_ wasm - Get security recommendations
- get_
supported_ algorithms - Get supported algorithms by category
- get_
supported_ algorithms_ wasm - Get supported algorithms by category
- get_
version - Get the library version
- hex_
to_ bytes - Convert hexadecimal string to bytes
- hex_
to_ bytes_ wasm - Convert hexadecimal string to bytes
- init_
wasm - Initialize the library for WASM usage
- is_
algorithm_ supported_ wasm - Check if an algorithm is supported
- is_
feature_ available - Check if a feature is available
- parse_
algorithm_ wasm - WASM-safe algorithm parsing that returns JsValue errors
- random_
bytes - Generate cryptographically secure random bytes for WASM
- secure_
deserialize - Secure WASM deserialization helper
- secure_
serialize - Secure WASM serialization helper
- validate_
input - Validate input data for WASM operations