pub fn encrypt<M: AsRef<[u8]>>(&self, message: M) -> Result<Vec<u8>> {
        encrypt_seal(
            self.0.master_key.as_bytes(),
            self.0.user_context.as_bytes(),
            message.as_ref(),
        )
    }
/// Encrypts and puts the provided message into a sealed cell.
///
/// # Examples
///
/// You can use anything convertible into a byte slice as a message: a byte slice or an array,
/// a `Vec<u8>`, or a `String`.
///
/// ```
/// # fn main() -> Result<(), themis::Error> {
/// use themis::secure_cell::SecureCell;
///
/// let cell = SecureCell::with_key(b"password").seal();
///
/// cell.encrypt(b"byte string")?;
/// cell.encrypt(&[1, 2, 3, 4, 5])?;
/// cell.encrypt(vec![6, 7, 8, 9])?;
/// cell.encrypt(format!("owned string"))?;
/// # Ok(())
/// # }
/// ```
///
/// However, the message must not be empty:
///
/// ```
/// # use themis::secure_cell::SecureCell;
/// #
/// # let cell = SecureCell::with_key(b"password").seal();
/// #
/// assert!(cell.encrypt(&[]).is_err());
/// ```
Encrypts and puts the provided message into a sealed cell.
Encrypts and puts the provided message into a sealed cell .
pub fn encrypt<M: AsRef<[u8]>>(&self, message: M) -> Result<Vec<u8>> {
        encrypt_seal(
            self.0.master_key.as_bytes(),
            self.0.user_context.as_bytes(),
            message.as_ref(),
        )
    }
pub fn encrypt < M : AsRef < [ u8 ] > > ( & self , message : M ) -> Result < Vec < u8 > > { encrypt_seal ( self . 0 . master_key . as_bytes ( ) , self . 0 . user_context . as_bytes ( ) , message . as_ref ( ) , ) }
Encrypts and puts the provided message into a sealed cell.
Encrypts and puts the provided message into a sealed cell .
&self
message
M
&self
message
M
examples
You can use anything convertible into a byte slice as a message: a byte slice or an array,
a `Vec`, or a `String`.


You can use anything convertible into a byte slice as a message : a byte slice or an array a ` Vec ` or a ` String ` .
fn main() -> result<(), themis::error> {
use themis::secure_cell::SecureCell.

let cell = SecureCell::with_key(b"password").seal().


use themis :: secure_cell :: SecureCell . let cell = SecureCell :: with_key ( b " password " ) . seal () .
ok(())
None
}


However, the message must not be empty.


However the message must not be empty .
use themis::secure_cell::securecell;
None
let cell = securecell::with_key(b"password").seal();
None