Browse Source

encrypt ids

fix-typo
Coin de Gamma 3 months ago
parent
commit
381fc1f6aa
  1. 3
      src/storage.rs

3
src/storage.rs

@ -109,6 +109,7 @@ impl Storage {
match line {
Ok(line) => {
if id.is_none() {
let line = encoder.decrypt(line)?;
id = Some(line);
} else {
let content = encoder.decrypt(line)?;
@ -192,7 +193,7 @@ impl Storage {
writeln!(file, "{}", self.encoder.get_encoded_test_passphrase()?)?;
for item in self.items.iter() {
writeln!(file, "{}", item.id)?;
writeln!(file, "{}", self.encoder.encrypt(&item.id)?)?;
let content = self.encoder.encrypt(&item.content)?;
writeln!(file, "{}", content)?;
}

Loading…
Cancel
Save