This commit is contained in:
2020-01-12 22:22:41 +08:00
parent 167f840524
commit 8d3d780266
3 changed files with 21 additions and 1 deletions

View File

@@ -14,4 +14,5 @@ license = "MIT"
rust-crypto = "0.2.36"
base64 = "0.11.0"
urlencoding = "1.0.0"
rust_util="0.2.0"
rust_util="0.2.1"
ring = "0.16.9"

View File

@@ -1,3 +1,5 @@
/// HMac Utils
pub mod hmac;
// RSA Utils
pub mod rsa;

17
src/rsa.rs Normal file
View File

@@ -0,0 +1,17 @@
// use std::path::Path;
// pub fn read_rsa_private_key_from_file(private_key_path: &Path) {
// let private_key_der = read_file(private_key_path)?;
// }
// fn read_file(path: &std::path::Path) -> Result<Vec<u8>, MyError> {
// use std::io::Read;
// let mut file = std::fs::File::open(path).map_err(|e| MyError::IO(e))?;
// let mut contents: Vec<u8> = Vec::new();
// file.read_to_end(&mut contents).map_err(|e| MyError::IO(e))?;
// Ok(contents)
// }