Struct PrivateKey
pub struct PrivateKey { /* private fields */ }
Implementations§
§impl PrivateKey
impl PrivateKey
pub const ENCODED_SIZE_BYTES: usize = 32usize
pub fn bytes(&self) -> &[u8; 32]
pub fn new(bytes: [u8; 32]) -> PrivateKey
pub fn new_from_slice(bytes: &[u8]) -> Result<PrivateKey, RecryptErr>
pub fn new_from_slice(bytes: &[u8]) -> Result<PrivateKey, RecryptErr>
construct $t from byte slice. Input slice must be exactly the correct length for the type.
§Returns
Ok($t) or Err($RecryptErr::InputWrongSize]
pub fn augment_plus(&self, other: &PrivateKey) -> PrivateKey
pub fn augment_plus(&self, other: &PrivateKey) -> PrivateKey
Augment the private key with another. This function performs the addition in Fr, which matches the cycle of the elliptic curve. This allows augmented private keys to line up correctly with public keys generated from them.
pub fn augment_minus(&self, other: &PrivateKey) -> PrivateKey
pub fn augment_minus(&self, other: &PrivateKey) -> PrivateKey
Augment the private key with another. This function performs the subtraction in Fr, which matches the cycle of the elliptic curve. This allows augmented private keys to line up correctly with public keys generated from them.
Trait Implementations§
§impl Clone for PrivateKey
impl Clone for PrivateKey
§fn clone(&self) -> PrivateKey
fn clone(&self) -> PrivateKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for PrivateKey
impl Debug for PrivateKey
§impl Default for PrivateKey
impl Default for PrivateKey
§fn default() -> PrivateKey
fn default() -> PrivateKey
Returns the “default value” for a type. Read more
§impl Hash for PrivateKey
impl Hash for PrivateKey
§impl PartialEq for PrivateKey
impl PartialEq for PrivateKey
impl Eq for PrivateKey
Auto Trait Implementations§
impl Freeze for PrivateKey
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
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
Source§impl<T> Clear for Twhere
T: InitializableFromZeroed + ?Sized,
impl<T> Clear for Twhere
T: InitializableFromZeroed + ?Sized,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InitializableFromZeroed for Twhere
T: Default,
impl<T> InitializableFromZeroed for Twhere
T: Default,
Source§unsafe fn initialize(place: *mut T)
unsafe fn initialize(place: *mut T)
Called to initialize a place to a valid value, after it is set
to all-bits-zero. Read more