Specify and solidify usage modes

This commit is contained in:
RandyTheSilly committed 2025-05-08 20:18:31 +00:00
1 parent 9d7417e26d
commit d324e62474
4 files changed
+32 -5

No files matched your search

+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)