Registry / crypto / aes-gcm

aes-gcm

JSON →
library0.10.3rscratesunverified

Pure Rust implementation of the AES-GCM authenticated encryption cipher with optional hardware acceleration.

# Cargo.toml [dependencies] aes-gcm = "0.10.3"
INSTALL
IMPORT
SIG · AES-GCM
A
aes-gcm
cryptorustv0.10.3
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.

Aes256Gcm
use aes_gcm::Aes256Gcm;

Encrypt data using AES-256-GCM.

use aes_gcm::Aes256Gcm; use aes_gcm::aead::{Aead, KeyInit, Nonce}; let key = Aes256Gcm::generate_key(&mut rand::rngs::OsRng); let cipher = Aes256Gcm::new(&key); let nonce = Nonce::from_slice(b"unique nonce"); let ciphertext = cipher.encrypt(nonce, b"plaintext").unwrap();
Debug
Known issues
gotchaRequires the `aes` feature for hardware acceleration on x86/x86_64.
fix
Add `features = ["aes"]` to the dependency in Cargo.toml.
affects: >=0.10.0
Upgrade
Version history
0.10.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
42 hits · last 30 days
node
38
Resources