aboutsummaryrefslogtreecommitdiffstats
path: root/sym_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'sym_test.go')
-rw-r--r--sym_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/sym_test.go b/sym_test.go
index 7a223e3..4d648d3 100644
--- a/sym_test.go
+++ b/sym_test.go
@@ -13,6 +13,12 @@ var testEncryptOptions = func() encryptOptions {
return opts
}()
+var testDecryptOptions = func() decryptOptions {
+ opts := defaultDecryptOptions
+ opts.iterations = 10
+ return opts
+}()
+
func mustWriteFile(t *testing.T, path string, content []byte) {
t.Helper()
if err := os.WriteFile(path, content, 0600); err != nil {
@@ -65,7 +71,7 @@ func TestEncryptDecrypt(t *testing.T) {
t.Fatalf("EncryptFile failed: %s", err)
}
mustRemove(t, fileName)
- if err := defaultDecryptOptions.decryptFile(fileName+".enc", password); err != nil {
+ if err := testDecryptOptions.decryptFile(fileName+".enc", password); err != nil {
t.Fatalf("DecryptFile failed: %s", err)
}
gotContents := mustReadFile(t, fileName)