[][src]Function safe_app::utils::symmetric_encrypt

pub fn symmetric_encrypt(
    plain_text: &[u8],
    secret_key: &[u8; 32],
    nonce: Option<&[u8; 16]>
) -> Result<Vec<u8>, CoreError>

Symmetric encryption. If nonce is None, then it will be generated randomly.