rusty_crypt 0.1.0

Rust library allowing for a very quick and simple implementation of AES-GCM encryption
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//use rand::{TryRngCore};
use rand::RngCore;
use rand::rngs::OsRng;

//use base64::{engine::general_purpose, Engine as _};

pub struct AesGeneratedKey;

impl AesGeneratedKey {

    pub fn generate_key(&self) -> [u8; 32] {
        let mut key: [u8; 32] = [0u8; 32];
        let _ = OsRng.try_fill_bytes(&mut key);
        key
    }

}