summaryrefslogtreecommitdiff
path: root/internal/encrypt.go
diff options
context:
space:
mode:
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 {