diff options
Diffstat (limited to 'internal/crypt/rawDecrypt.go')
| -rw-r--r-- | internal/crypt/rawDecrypt.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/crypt/rawDecrypt.go b/internal/crypt/rawDecrypt.go index b82f0fb..fe190a5 100644 --- a/internal/crypt/rawDecrypt.go +++ b/internal/crypt/rawDecrypt.go @@ -37,6 +37,8 @@ func DecryptRawBytes(inputBytes []byte, password []byte) ([]byte, error) { } key := argon2.IDKey(password, headers.Salt[:], 1, 2*1024*1024, 2, 32) + utils.TryMlock(key) + defer clear(key) aead, err := chacha20poly1305.New(key) if err != nil { return nil, fmt.Errorf("decrypt: failed to create cipher: %w", err) |