Struct recrypt::api::PublicKey [−]
pub struct PublicKey { /* fields omitted */ }Methods
impl PublicKey
impl PublicKeypub const ENCODED_SIZE_BYTES: usize
ENCODED_SIZE_BYTES: usize = <Fp256>::ENCODED_SIZE_BYTES * 2
pub fn new(
(x_bytes, y_bytes): ([u8; 32], [u8; 32])
) -> Result<PublicKey, ApiErr>
pub fn new(
(x_bytes, y_bytes): ([u8; 32], [u8; 32])
) -> Result<PublicKey, ApiErr>pub fn new_from_slice(bytes: (&[u8], &[u8])) -> Result<Self, ApiErr>
pub fn new_from_slice(bytes: (&[u8], &[u8])) -> Result<Self, ApiErr>pub fn bytes_x_y(&self) -> (&[u8; 32], &[u8; 32])
pub fn bytes_x_y(&self) -> (&[u8; 32], &[u8; 32])pub fn augment(&self, other: &PublicKey) -> Result<PublicKey, ApiErr>
pub fn augment(&self, other: &PublicKey) -> Result<PublicKey, ApiErr>Augment the PublicKey so that messages encrypted to that key cannot be decrypted by this PublicKey's PrivateKey.
This can be useful if you want to force delegation via transform. See TransformKey.augment.
Note that by augmenting a PublicKey you're committing to augmenting all TransformKeys that are created from
this keypair. Otherwise the transformed data will not be able to be correctly decrypted.
Trait Implementations
impl PartialEq for PublicKey
impl PartialEq for PublicKeyfn eq(&self, other: &PublicKey) -> bool
fn eq(&self, other: &PublicKey) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &PublicKey) -> bool
fn ne(&self, other: &PublicKey) -> boolThis method tests for !=.
impl Eq for PublicKey
impl Eq for PublicKeyimpl Clone for PublicKey
impl Clone for PublicKeyfn clone(&self) -> PublicKey
fn clone(&self) -> PublicKeyReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Copy for PublicKey
impl Copy for PublicKeyimpl Debug for PublicKey
impl Debug for PublicKey