diff --git a/Cargo.toml b/Cargo.toml index c577f58..ada9482 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/lib.rs b/src/lib.rs index 0968e66..f99ea01 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,5 @@ /// HMac Utils pub mod hmac; +// RSA Utils +pub mod rsa; \ No newline at end of file diff --git a/src/rsa.rs b/src/rsa.rs new file mode 100644 index 0000000..5331121 --- /dev/null +++ b/src/rsa.rs @@ -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, MyError> { +// use std::io::Read; + +// let mut file = std::fs::File::open(path).map_err(|e| MyError::IO(e))?; +// let mut contents: Vec = Vec::new(); +// file.read_to_end(&mut contents).map_err(|e| MyError::IO(e))?; +// Ok(contents) +// } +