Specify and solidify usage modes

This commit is contained in:
2025-05-08 20:18:31 +00:00
parent 9d7417e26d
commit d324e62474
4 changed files with 32 additions and 5 deletions
+2
View File
@@ -1,6 +1,7 @@
package wrappers
// Decrypt decrypts the provided byte slice using the provided passphrase.
// Do NOT use directly if using the RCW daemon.
func Decrypt(encBytes []byte, passphrase []byte) ([]byte, error) {
var err error = nil
encBytes, err = decryptCha(encBytes, passphrase)
@@ -15,6 +16,7 @@ func Decrypt(encBytes []byte, passphrase []byte) ([]byte, error) {
}
// Encrypt encrypts the provided byte slice using the provided passphrase.
// Do NOT use directly if using the RCW daemon.
func Encrypt(decBytes []byte, passphrase []byte) []byte {
decBytes = encryptAES(decBytes, passphrase)
decBytes = encryptCha(decBytes, passphrase)