2015-11-24 19:55:14 +00:00
|
|
|
use super::super::types::Error;
|
2015-11-23 14:40:04 +00:00
|
|
|
|
|
|
|
pub enum Crypto {
|
|
|
|
None
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Crypto {
|
2015-11-24 19:55:14 +00:00
|
|
|
pub fn method(&self) -> u8 {
|
|
|
|
0
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn nonce_bytes(&self) -> usize {
|
|
|
|
0
|
|
|
|
}
|
|
|
|
|
2015-11-24 22:47:38 +00:00
|
|
|
pub fn additional_bytes(&self) -> usize {
|
2015-11-24 19:55:14 +00:00
|
|
|
0
|
2015-11-23 14:40:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pub fn from_shared_key(_password: &str) -> Self {
|
|
|
|
panic!("This binary has no crypto support");
|
|
|
|
}
|
|
|
|
|
2015-11-24 22:47:38 +00:00
|
|
|
pub fn decrypt(&self, mut _buf: &mut [u8], _nonce: &[u8], _hash: &[u8]) -> Result<usize, Error> {
|
2015-11-24 19:55:14 +00:00
|
|
|
unreachable!("This should never be called")
|
2015-11-23 14:40:04 +00:00
|
|
|
}
|
|
|
|
|
2015-11-24 22:47:38 +00:00
|
|
|
pub fn encrypt(&mut self, mut _buf: &mut [u8], _mlen: usize, _nonce_bytes: &mut [u8], _header: &[u8]) -> usize {
|
2015-11-24 19:55:14 +00:00
|
|
|
unreachable!("This should never be called")
|
2015-11-23 14:40:04 +00:00
|
|
|
}
|
|
|
|
}
|