From f1945c4daae65074cfca8f0ab5b97ac5a50c24a0 Mon Sep 17 00:00:00 2001 From: danim7 Date: Sat, 8 Apr 2017 02:09:28 +0200 Subject: Add -forcedecode Force decode of encrypted files even if the integrity check fails, instead of failing with an IO error. Warning messages are still printed to syslog if corrupted files are encountered. It can be useful to recover files from disks with bad sectors or other corrupted media. Closes https://github.com/rfjakob/gocryptfs/pull/102 . --- internal/stupidgcm/stupidgcm_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/stupidgcm/stupidgcm_test.go') diff --git a/internal/stupidgcm/stupidgcm_test.go b/internal/stupidgcm/stupidgcm_test.go index 3081085..eb322f2 100644 --- a/internal/stupidgcm/stupidgcm_test.go +++ b/internal/stupidgcm/stupidgcm_test.go @@ -27,7 +27,7 @@ func randBytes(n int) []byte { // GCM implemenatation and verifies that the results are identical. func TestEncryptDecrypt(t *testing.T) { key := randBytes(32) - sGCM := New(key) + sGCM := New(key, false) authData := randBytes(24) iv := randBytes(16) dst := make([]byte, 71) // 71 = random length @@ -77,7 +77,7 @@ func TestEncryptDecrypt(t *testing.T) { // error func TestCorruption(t *testing.T) { key := randBytes(32) - sGCM := New(key) + sGCM := New(key, false) authData := randBytes(24) iv := randBytes(16) -- cgit v1.2.3