{"id":58191,"library":"subtle-encoding","title":"Subtle Encoding","description":"Encoders and decoders for common data encodings (base64, bech32, hex) which avoid data-dependent branching/table lookups and provide 'best effort' constant time.","status":"active","version":"0.5.1","language":"rust","source_language":null,"source_url":"https://github.com/iqlusioninc/crates","tags":["encoding","constant-time","cryptography","base64","hex","bech32"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nsubtle-encoding = \"0.5.1\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add subtle-encoding","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"Encoding","correct":"use subtle_encoding::Encoding;"}],"quickstart":{"code":"use subtle_encoding::Encoding;\nuse subtle_encoding::hex::Hex;\n\nfn main() {\n    let hex = Hex::lower_case();\n    let encoded = hex.encode_to_string(b\"hello\");\n    println!(\"{}\", encoded); // \"68656c6c6f\"\n}","lang":"rust","description":"Encode bytes to hex using constant-time encoding."},"warnings":[{"fix":"Verify your threat model; use dedicated crypto libraries for strict constant-time requirements.","message":"Not all encodings are truly constant-time; 'best effort' only.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'avoid':14 'base64':10,31 'bech32':11,33 'best':22 'branching/table':18 'common':7 'constant':24,28 'constant-tim':27 'cryptographi':30 'data':8,16 'data-depend':15 'decod':5 'depend':17 'effort':23 'encod':2,3,9,26 'hex':12,32 'lookup':19 'provid':21 'subtl':1 'time':25,29","created_at":"2026-06-16T16:14:58.855393+00:00","updated_at":"2026-06-16T16:14:58.855393+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/iqlusioninc/crates/","github":"https://github.com/iqlusioninc/crates","docs":"https://docs.rs/subtle-encoding/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["crypto","utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}