{"id":57701,"library":"cipher","title":"Cipher","description":"Traits for describing block ciphers and stream ciphers in Rust.","status":"active","version":"0.5.2","language":"rust","source_language":null,"source_url":"https://github.com/RustCrypto/traits","tags":["cryptography","cipher","block-cipher","stream-cipher","traits"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\ncipher = \"0.5.2\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add cipher","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"BlockCipher","correct":"use cipher::{BlockCipher, StreamCipher};"}],"quickstart":{"code":"use cipher::{BlockCipher, KeyInit, generic_array::GenericArray};\n\nfn main() {\n    let key = GenericArray::from_slice(b\"an example key..\");\n    let cipher = aes::Aes128::new(key);\n    println!(\"Cipher initialized\");\n}","lang":"rust","description":"Demonstrates using the cipher traits with a concrete AES implementation."},"warnings":[],"env_vars":null,"search_vec":"'block':5,15 'block-ciph':14 'cipher':1,6,9,13,16,19 'cryptographi':12 'describ':4 'rust':11 'stream':8,18 'stream-ciph':17 'trait':2,20","created_at":"2026-06-16T15:54:25.099917+00:00","updated_at":"2026-06-16T15:54:25.099917+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/RustCrypto/traits","github":"https://github.com/RustCrypto/traits","docs":"https://docs.rs/cipher/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["crypto"],"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}}