summaryrefslogtreecommitdiff
path: root/internal/encrypt.go
diff options
context:
space:
mode:
authorLevi Durfee <levi.durfee@gmail.com>2026-01-08 18:50:19 -0500
committerLevi Durfee <levi.durfee@gmail.com>2026-01-08 18:54:54 -0500
commit6f706d0d05612d9778ece6414b3427c176214586 (patch)
treeb25266e973cb17ce4524f56314e621f8644a02aa /internal/encrypt.go
parentdc0d6a4bf3c412aa69c579b74b0586fd61a08508 (diff)
Work on comments
Diffstat (limited to 'internal/encrypt.go')
-rw-r--r--internal/encrypt.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/encrypt.go b/internal/encrypt.go
index 4efa722..5d2c794 100644
--- a/internal/encrypt.go
+++ b/internal/encrypt.go
@@ -1,5 +1,8 @@
package internal
+// Encrypt generates a new salt, creates the kek from the passphrase and the new
+// salt, creates a new dek, wraps the dek with the kek, encrypts the data with
+// the dek, then returns the edek, salt, and ciphertext.
func Encrypt(passphrase string, data []byte) (EncryptedDataPayload, error) {
salt, err := NewSalt()
if err != nil {