feat: v1.4.0 add cmd_pgpcardserve.rs

This commit is contained in:
2022-07-01 00:14:27 +08:00
parent 5aadb3f082
commit 00dee7b000
5 changed files with 547 additions and 5 deletions

11
src/randutil.rs Normal file
View File

@@ -0,0 +1,11 @@
use rand::Rng;
pub fn make_rand(len: usize) -> Vec<u8> {
let mut rng = rand::thread_rng();
let mut r = Vec::new();
for _ in 0..len {
let b: u8 = rng.gen();
r.push(b);
}
r
}