summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/backend/nettle.rs
blob: 25fc64eb278da05b3ec8ef14adef89e0a77756c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Implementation of Sequoia crypto API using the Nettle cryptographic library.

use nettle::random::{Random, Yarrow};

pub mod aead;
pub mod asymmetric;
pub mod ecdh;
pub mod hash;

/// Fills the given buffer with random data.
pub fn random<B: AsMut<[u8]>>(mut buf: B) {
    Yarrow::default().random(buf.as_mut());
}