src/backup/crypt_setup.rs: add comment for possible improvements

This commit is contained in:
Dietmar Maurer 2019-06-13 07:35:59 +02:00
parent bd0e3c7cfa
commit 046bcb9773

View File

@ -82,6 +82,7 @@ impl CryptConfig {
/// chunk digest values do not clash with values computed for /// chunk digest values do not clash with values computed for
/// other sectret keys. /// other sectret keys.
pub fn compute_digest(&self, data: &[u8]) -> [u8; 32] { pub fn compute_digest(&self, data: &[u8]) -> [u8; 32] {
// FIXME: use HMAC-SHA256 instead??
let mut hasher = openssl::sha::Sha256::new(); let mut hasher = openssl::sha::Sha256::new();
hasher.update(&self.id_key); hasher.update(&self.id_key);
hasher.update(data); hasher.update(data);