aboutsummaryrefslogtreecommitdiff
path: root/openssl/src
diff options
context:
space:
mode:
authorDaniel Albert <[email protected]>2016-01-12 18:15:07 +0000
committerDaniel Albert <[email protected]>2016-01-12 18:15:07 +0000
commit7e8df9febdc45b7c84adbf86e380e3114ad7367f (patch)
tree86c8806e82b7b04c0f7588b8a6617322d1598aac /openssl/src
parentMake all ffi structs' fields public (diff)
downloadrust-openssl-7e8df9febdc45b7c84adbf86e380e3114ad7367f.tar.xz
rust-openssl-7e8df9febdc45b7c84adbf86e380e3114ad7367f.zip
Adhere to rust conventions
Diffstat (limited to 'openssl/src')
-rw-r--r--openssl/src/crypto/rsa.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/openssl/src/crypto/rsa.rs b/openssl/src/crypto/rsa.rs
index ef59a07e..40d61884 100644
--- a/openssl/src/crypto/rsa.rs
+++ b/openssl/src/crypto/rsa.rs
@@ -3,33 +3,29 @@ use bn::BigNum;
use std::fmt;
pub struct RSA {
- pub rsa_obj : ffi::RSA
+ rsa_obj : ffi::RSA
}
impl RSA {
- pub unsafe fn get_n(&self) -> BigNum {
+ pub unsafe fn n(&self) -> BigNum {
BigNum::new_from_ffi(self.rsa_obj.n).unwrap()
}
- pub unsafe fn get_d(&self) -> BigNum {
+ pub unsafe fn d(&self) -> BigNum {
BigNum::new_from_ffi(self.rsa_obj.d).unwrap()
}
- pub unsafe fn get_e(&self) -> BigNum {
+ pub unsafe fn e(&self) -> BigNum {
BigNum::new_from_ffi(self.rsa_obj.e).unwrap()
}
- pub unsafe fn get_p(&self) -> BigNum {
+ pub unsafe fn p(&self) -> BigNum {
BigNum::new_from_ffi(self.rsa_obj.p).unwrap()
}
- pub unsafe fn get_q(&self) -> BigNum {
+ pub unsafe fn q(&self) -> BigNum {
BigNum::new_from_ffi(self.rsa_obj.q).unwrap()
}
-
- pub fn get_type(&self) -> &str {
- "rsa"
- }
}
impl fmt::Debug for RSA {