Struct recrypt::api::PrivateKey [−]
pub struct PrivateKey { /* fields omitted */ }
Implementations
impl PrivateKey
impl PrivateKey
pub const ENCODED_SIZE_BYTES: usize
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 copy of the value. Read more
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 Drop for PrivateKey
impl Drop for PrivateKey
impl Hash for PrivateKey
impl Hash for PrivateKey
impl PartialEq<PrivateKey> for PrivateKey
impl PartialEq<PrivateKey> for PrivateKey
impl Eq for PrivateKey
Auto Trait Implementations
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
Blanket Implementations
Mutably borrows from an owned value. Read more
Called to initialize a place to a valid value, after it is set to all-bits-zero. Read more