Switch to buffer alias

This commit is contained in:
BlackHoleFox
2020-06-08 22:09:57 -05:00
parent 0f907ebd5c
commit 6e3560c10f
+6 -6
View File
@@ -672,7 +672,7 @@ fn write_key(
touch_policy: TouchPolicy, touch_policy: TouchPolicy,
algorithm: AlgorithmId, algorithm: AlgorithmId,
) -> Result<(), Error> { ) -> Result<(), Error> {
let mut key_data = Zeroizing::new(vec![0u8; KEYDATA_LEN]); let mut key_data = Buffer::new(vec![0u8; KEYDATA_LEN]);
let templ = [0, Ins::ImportKey.code(), algorithm.into(), slot.into()]; let templ = [0, Ins::ImportKey.code(), algorithm.into(), slot.into()];
let mut offset = 0; let mut offset = 0;
@@ -714,15 +714,15 @@ fn write_key(
#[cfg(feature = "untested")] #[cfg(feature = "untested")]
pub struct RsaKeyData { pub struct RsaKeyData {
/// The secret prime `p`. /// The secret prime `p`.
p: Zeroizing<Vec<u8>>, p: Buffer,
/// The secret prime, `q`. /// The secret prime, `q`.
q: Zeroizing<Vec<u8>>, q: Buffer,
/// D mod (P-1) /// D mod (P-1)
dp: Zeroizing<Vec<u8>>, dp: Buffer,
/// D mod (Q-1) /// D mod (Q-1)
dq: Zeroizing<Vec<u8>>, dq: Buffer,
/// Q^-1 mod P /// Q^-1 mod P
qinv: Zeroizing<Vec<u8>>, qinv: Buffer,
} }
#[cfg(feature = "untested")] #[cfg(feature = "untested")]