pub struct Request {
pub secret_key: Vec<u8>,
pub signature_secret_key: Vec<u8>,
pub nonce: Option<Vec<u8>>,
}
Fields
secret_key: Vec<u8>
signature_secret_key: Vec<u8>
nonce: Option<Vec<u8>>
Implementations
sourceimpl Request
impl Request
sourcepub fn encrypt(
&mut self,
data: String,
public_key: Vec<u8>
) -> Result<Vec<u8>, Error>
pub fn encrypt(
&mut self,
data: String,
public_key: Vec<u8>
) -> Result<Vec<u8>, Error>
Encrypts a message with a given public key
sourcepub fn encrypt_with_nonce(
&mut self,
data: String,
public_key: Vec<u8>,
nonce: Option<Vec<u8>>,
version: Option<i32>
) -> Result<Vec<u8>, Error>
pub fn encrypt_with_nonce(
&mut self,
data: String,
public_key: Vec<u8>,
nonce: Option<Vec<u8>>,
version: Option<i32>
) -> Result<Vec<u8>, Error>
Encrypts a message with a given public key, none, and version identifier
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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