chore: rm unused code
This commit is contained in:
@@ -6,29 +6,6 @@ use sequoia_openpgp::crypto::mpi::PublicKey;
|
|||||||
|
|
||||||
use crate::digest::sha256_bytes;
|
use crate::digest::sha256_bytes;
|
||||||
|
|
||||||
// pub fn to_pem(bs: &[u8], sub: &str, w: usize) -> String {
|
|
||||||
// let mut s = String::with_capacity(bs.len() * 2);
|
|
||||||
// s.push_str(&format!("-----BEGIN {}-----", sub));
|
|
||||||
// let b64 = base64::encode(bs).chars().collect::<Vec<char>>();
|
|
||||||
// let mut b64 = b64.as_slice();
|
|
||||||
// while !b64.is_empty() {
|
|
||||||
// s.push('\n');
|
|
||||||
// if b64.len() >= w {
|
|
||||||
// for c in b64.iter().take(w) {
|
|
||||||
// s.push(*c);
|
|
||||||
// }
|
|
||||||
// b64 = &b64[w..];
|
|
||||||
// } else {
|
|
||||||
// for c in b64 {
|
|
||||||
// s.push(*c);
|
|
||||||
// }
|
|
||||||
// b64 = &[];
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// s.push_str(&format!("\n-----END {}-----", sub));
|
|
||||||
// s
|
|
||||||
// }
|
|
||||||
|
|
||||||
pub fn bytes_to_pem<T>(tag: &str, contents: T) -> String where T: Into<Vec<u8>> {
|
pub fn bytes_to_pem<T>(tag: &str, contents: T) -> String where T: Into<Vec<u8>> {
|
||||||
let cert_public_key_pem_obj = Pem {
|
let cert_public_key_pem_obj = Pem {
|
||||||
tag: tag.to_string(),
|
tag: tag.to_string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user