Rename NoPadding to None
This commit is contained in:
parent
b6719de92e
commit
c1e41349fb
|
|
@ -14,17 +14,17 @@ use crypto::util::{CallbackState, invoke_passwd_cb};
|
||||||
/// Type of encryption padding to use.
|
/// Type of encryption padding to use.
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub enum Padding {
|
pub enum Padding {
|
||||||
NoPadding,
|
None,
|
||||||
OAEP,
|
OAEP,
|
||||||
PKCS1v15
|
PKCS1v15
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Padding {
|
impl Padding {
|
||||||
fn openssl_padding_code(&self) -> c_int {
|
fn openssl_padding_code(&self) -> c_int {
|
||||||
match self {
|
match *self {
|
||||||
&Padding::NoPadding => ffi::RSA_NO_PADDING,
|
Padding::None => ffi::RSA_NO_PADDING,
|
||||||
&Padding::OAEP => ffi::RSA_PKCS1_OAEP_PADDING,
|
Padding::OAEP => ffi::RSA_PKCS1_OAEP_PADDING,
|
||||||
&Padding::PKCS1v15 => ffi::RSA_PKCS1_PADDING
|
Padding::PKCS1v15 => ffi::RSA_PKCS1_PADDING
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue