Skip to main content

InMemoryNodeIdentity

Struct InMemoryNodeIdentity 

Source
pub struct InMemoryNodeIdentity { /* private fields */ }

Implementations§

Source§

impl InMemoryNodeIdentity

Source

pub fn from_secret_key_bytes(bytes: &[u8; 64]) -> InMemoryNodeIdentity

Source

pub fn shared_secret_with( &self, peer_encryption_public: &X25519PublicKey, ) -> X25519SharedSecret

Source

pub fn decrypt_in_place<'t>( &self, ciphertext_token: &'t mut [u8], ) -> Result<&'t [u8], DecryptError>

Source

pub fn decrypt( &self, ciphertext_token: &[u8], out: &mut [u8], ) -> Result<usize, DecryptError>

Source

pub fn into_parts(self) -> IdentityParts

Trait Implementations§

Source§

impl IdentitySigner for InMemoryNodeIdentity

Source§

fn encryption_public_key(&self) -> IdentityEncryptionPublicKey

Source§

fn signing_public_key(&self) -> IdentitySigningPublicKey

Source§

fn identity_hash(&self) -> IdentityHash

Source§

fn sign(&self, message: &[u8]) -> Ed25519Signature

Source§

fn public_key_bytes(&self) -> [u8; 64]

The wire form RNS calls Identity.get_public_key(): encryption key ‖ signing key.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.