Registry / crypto / subtle-encoding

subtle-encoding

JSON →
library0.5.1rscratesunverified

Encoders and decoders for common data encodings (base64, bech32, hex) which avoid data-dependent branching/table lookups and provide 'best effort' constant time.

# Cargo.toml [dependencies] subtle-encoding = "0.5.1"
INSTALL
IMPORT
SIG · SUBTLE-ENCODING
S
subtle-encoding
cryptorustv0.5.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Encoding
use subtle_encoding::Encoding;

Encode bytes to hex using constant-time encoding.

use subtle_encoding::Encoding; use subtle_encoding::hex::Hex; fn main() { let hex = Hex::lower_case(); let encoded = hex.encode_to_string(b"hello"); println!("{}", encoded); // "68656c6c6f" }
Debug
Known issues
gotchaNot all encodings are truly constant-time; 'best effort' only.
fix
Verify your threat model; use dedicated crypto libraries for strict constant-time requirements.
affects: >=0.1.0
Upgrade
Version history
0.5.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
Amazon
1
Resources
subtle-encoding — cargo add subtle-encoding · libregistry