get_salt

Function get_salt 

Source
pub fn get_salt(data: &[u8]) -> Option<Salt>
Expand description

Get Salt from data encrypted with TES.

§Fails when:

  • data doesn’t appear to be a TES
  • number of bytes in data is not enough

E.g.

use tox_encryptsave::*;

assert_eq!(get_salt(&[]), None);