aboutsummaryrefslogtreecommitdiff
path: root/internal/crypt/salt.go
diff options
context:
space:
mode:
authorishaan <contact@ishaan.cc>2026-08-03 11:15:02 +0530
committerishaan <contact@ishaan.cc>2026-08-03 11:15:02 +0530
commit5375294e0bed1fa01cb5f4ff73f2c093b74cd8e2 (patch)
tree9049f67a82a40cce28c052a1f9e0de50bbc0e508 /internal/crypt/salt.go
parentb65769aadfc79d22672d4bd512443f0dda8cf6ad (diff)
fix new --edit fallthrough, cleanup error handling
Diffstat (limited to 'internal/crypt/salt.go')
-rw-r--r--internal/crypt/salt.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/crypt/salt.go b/internal/crypt/salt.go
index 46874bd..09b6c72 100644
--- a/internal/crypt/salt.go
+++ b/internal/crypt/salt.go
@@ -9,7 +9,7 @@ import (
func NewSalt() ([16]byte, error) {
salt := [16]byte{}
if _, err := io.ReadFull(rand.Reader, salt[:]); err != nil {
- return [16]byte{}, fmt.Errorf("crypt: failed to read salt: %w", err)
+ return [16]byte{}, fmt.Errorf("failed to read salt: %w", err)
}
return salt, nil
@@ -18,7 +18,7 @@ func NewSalt() ([16]byte, error) {
func NewNonce() ([12]byte, error) {
nonce := [12]byte{}
if _, err := io.ReadFull(rand.Reader, nonce[:]); err != nil {
- return [12]byte{}, fmt.Errorf("crypt: failed to read nonce: %w", err)
+ return [12]byte{}, fmt.Errorf("failed to read nonce: %w", err)
}
return nonce, nil