Clean up old debugging infrastructure.

This commit is contained in:
2019-03-05 16:12:25 -07:00
parent f1f39f8b5f
commit 91d595ee4b
4 changed files with 1 additions and 40 deletions

View File

@@ -36,15 +36,6 @@ pub enum RSAPrivate {
Key15360(RSA15360Private)
}
// fn print_vector(name: &'static str, bytes: &[u8])
// {
// print!("{}: (length {}) ", name, bytes.len());
// for x in bytes.iter() {
// print!("{:02X}", *x);
// }
// println!("");
// }
macro_rules! generate_rsa_private
{
($rsa: ident, $num: ident, $bar: ident, $size: expr) => {

View File

@@ -102,8 +102,6 @@ impl FromASN1 for RSAPublic {
let nsize = n.bits();
let mut rsa_size = 512;
println!("n': {:X}", n);
println!("nsize: {}", nsize);
while rsa_size < nsize {
rsa_size = rsa_size + 256;
}
@@ -178,15 +176,6 @@ impl ToASN1 for RSAPublic {
}
}
// fn print_vector(name: &'static str, bytes: &[u8])
// {
// print!("{}: (length {}) ", name, bytes.len());
// for x in bytes.iter() {
// print!("{:02X}", *x);
// }
// println!("");
// }
macro_rules! generate_rsa_public
{
($rsa: ident, $num: ident, $bar: ident, $var: ident, $size: expr) => {
@@ -472,7 +461,7 @@ macro_rules! generate_tests {
384 => privkey.decrypt(&OAEPParams::<Sha384>::new(lstr), &cipher.unwrap()),
512 => privkey.decrypt(&OAEPParams::<Sha512>::new(lstr), &cipher.unwrap()),
x => panic!("Unknown hash number: {}", x)
};
};
assert!(message.is_ok());
assert_eq!(mbytes, &message.unwrap());
});