Struct PublicKey
pub struct PublicKey { /* private fields */ }
Implementations§
§impl PublicKey
impl PublicKey
pub const ENCODED_SIZE_BYTES: usize = 64usize
pub fn new( (x_bytes, y_bytes): ([u8; 32], [u8; 32]), ) -> Result<PublicKey, RecryptErr>
pub fn new_from_slice(bytes: (&[u8], &[u8])) -> Result<Self, RecryptErr>
pub fn bytes_x_y(&self) -> (&[u8; 32], &[u8; 32])
pub fn augment(&self, other: &PublicKey) -> Result<PublicKey, RecryptErr>
pub fn augment(&self, other: &PublicKey) -> Result<PublicKey, RecryptErr>
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 Hashable for PublicKey
impl Hashable for PublicKey
§fn to_bytes(&self) -> ByteVector
fn to_bytes(&self) -> ByteVector
Convert self to a stable byte representation.
impl Copy for PublicKey
impl Eq 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