aboutsummaryrefslogtreecommitdiff
path: root/internal/crypt/rawDecrypt.go
diff options
context:
space:
mode:
authorishaan <contact@ishaan.cc>2026-07-13 11:09:34 +0530
committerishaan <contact@ishaan.cc>2026-07-13 11:09:34 +0530
commitd433b1af731ff901b9c14a647678471b27fdfe8a (patch)
treeb101b59e89d826386de8bbada4c405a3cfbf6b3f /internal/crypt/rawDecrypt.go
parent388971e7a86be97f6a7412cd1d526016bc4e14ce (diff)
better
Diffstat (limited to 'internal/crypt/rawDecrypt.go')
-rw-r--r--internal/crypt/rawDecrypt.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/crypt/rawDecrypt.go b/internal/crypt/rawDecrypt.go
index fe190a5..28d7856 100644
--- a/internal/crypt/rawDecrypt.go
+++ b/internal/crypt/rawDecrypt.go
@@ -4,7 +4,6 @@ import (
"fmt"
"strconv"
- "gitlab.com/whiteboardguy/eno/internal/utils"
"golang.org/x/crypto/argon2"
"golang.org/x/crypto/chacha20poly1305"
)
@@ -31,13 +30,13 @@ func DecryptRawBytes(inputBytes []byte, password []byte) ([]byte, error) {
}
headerBytes := inputBytes[idx+1 : idx+1+headerLen]
- headers, err := utils.GetFileHeaders(headerBytes)
+ headers, err := GetFileHeaders(headerBytes)
if err != nil {
return nil, fmt.Errorf("decrypt: %w", err)
}
key := argon2.IDKey(password, headers.Salt[:], 1, 2*1024*1024, 2, 32)
- utils.TryMlock(key)
+ TryMlock(key)
defer clear(key)
aead, err := chacha20poly1305.New(key)
if err != nil {