Struct saltyrtc_client::SaltyClient
source · [−]pub struct SaltyClient { /* private fields */ }
Expand description
The SaltyRTC Client instance.
To create an instance of this struct, use the
SaltyClientBuilder
.
Implementations
sourceimpl SaltyClient
impl SaltyClient
sourcepub fn build(permanent_key: KeyPair) -> SaltyClientBuilder
pub fn build(permanent_key: KeyPair) -> SaltyClientBuilder
Instantiate a new SaltyClientBuilder
instance.
sourcepub fn auth_token(&self) -> Option<&AuthToken>
pub fn auth_token(&self) -> Option<&AuthToken>
Return a reference to the auth token.
sourcepub fn initiator_pubkey(&self) -> &PublicKey
pub fn initiator_pubkey(&self) -> &PublicKey
Return a reference to the initiator public key.
sourcepub fn encrypt_task_message(&mut self, val: Value) -> SaltyResult<Vec<u8>>
pub fn encrypt_task_message(&mut self, val: Value) -> SaltyResult<Vec<u8>>
Encrypt a task message.
sourcepub fn encrypt_close_message(
&mut self,
reason: CloseCode
) -> SaltyResult<Vec<u8>>
pub fn encrypt_close_message(
&mut self,
reason: CloseCode
) -> SaltyResult<Vec<u8>>
Encrypt a close message for the peer.
sourcepub fn current_peer_sequence_numbers(&self) -> Option<PeerSequenceNumbers>
pub fn current_peer_sequence_numbers(&self) -> Option<PeerSequenceNumbers>
If the peer is already determined, return the current incoming and outgoing sequence numbers.
sourcepub fn encrypt_raw_with_session_keys(
&self,
data: &[u8],
nonce: &[u8]
) -> SaltyResult<Vec<u8>>
pub fn encrypt_raw_with_session_keys(
&self,
data: &[u8],
nonce: &[u8]
) -> SaltyResult<Vec<u8>>
Encrypt raw bytes using the session keys after the handshake has been finished.
sourcepub fn decrypt_raw_with_session_keys(
&self,
data: &[u8],
nonce: &[u8]
) -> SaltyResult<Vec<u8>>
pub fn decrypt_raw_with_session_keys(
&self,
data: &[u8],
nonce: &[u8]
) -> SaltyResult<Vec<u8>>
Decrypt raw bytes using the session keys after the handshake has been finished.
Auto Trait Implementations
impl !RefUnwindSafe for SaltyClient
impl !Send for SaltyClient
impl !Sync for SaltyClient
impl Unpin for SaltyClient
impl !UnwindSafe for SaltyClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more