pub struct PublicKey { /* private fields */ }
Expand description
Wrapper over libsodium-provided public key type.
Implementations§
source§impl PublicKey
impl PublicKey
sourcepub fn from_raw_curve25519(bytes: &[u8]) -> Result<PublicKey, SaltlickError>
pub fn from_raw_curve25519(bytes: &[u8]) -> Result<PublicKey, SaltlickError>
Load public key from raw Curve25519 bytes.
This must be PUBLICKEYBYTES
long. It corresponds to the key type used
by libsodium 1.x.
sourcepub fn from_pem(pem: &str) -> Result<PublicKey, SaltlickError>
pub fn from_pem(pem: &str) -> Result<PublicKey, SaltlickError>
Load public key from PEM string.
Trait Implementations§
source§impl PartialEq for PublicKey
impl PartialEq for PublicKey
impl Eq for PublicKey
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