pub struct PublicKey {
pub n: BigUint,
pub e: BigUint,
}
Fields§
§n: BigUint
§e: BigUint
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn new(_n: &BigUint, _e: &BigUint) -> Result<Self, &'static str>
pub fn new(_n: &BigUint, _e: &BigUint) -> Result<Self, &'static str>
Generate a PublicKey struct from n and d co-prime factors.
Trait Implementations§
Source§impl From<(&BigUint, &BigUint)> for PublicKey
Given n and e co-prime factors.
Returns a PublictKey Struct (without checking it’s correctness)
impl From<(&BigUint, &BigUint)> for PublicKey
Given n and e co-prime factors. Returns a PublictKey Struct (without checking it’s correctness)
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more