mirror of
https://github.com/rwinkhart/rcw.git
synced 2026-10-27 14:19:59 -04:00
Add documentation for high-level functions
This commit is contained in:
1 parent
f176d57b6b
commit
0479447f14
1 file changed
+2
@@ -1,5 +1,6 @@
|
|||||||
package wrappers
|
package wrappers
|
||||||
|
|
||||||
|
// Decrypt decrypts the provided byte slice using the provided passphrase.
|
||||||
func Decrypt(encBytes []byte, passphrase []byte) ([]byte, error) {
|
func Decrypt(encBytes []byte, passphrase []byte) ([]byte, error) {
|
||||||
var err error = nil
|
var err error = nil
|
||||||
encBytes, err = decryptCha(encBytes, passphrase)
|
encBytes, err = decryptCha(encBytes, passphrase)
|
||||||
@@ -13,6 +14,7 @@ func Decrypt(encBytes []byte, passphrase []byte) ([]byte, error) {
|
|||||||
return encBytes, err
|
return encBytes, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Encrypt encrypts the provided byte slice using the provided passphrase.
|
||||||
func Encrypt(decBytes []byte, passphrase []byte) []byte {
|
func Encrypt(decBytes []byte, passphrase []byte) []byte {
|
||||||
decBytes = encryptAES(decBytes, passphrase)
|
decBytes = encryptAES(decBytes, passphrase)
|
||||||
decBytes = encryptCha(decBytes, passphrase)
|
decBytes = encryptCha(decBytes, passphrase)
|
||||||
|
|||||||
Reference in new issue
Block a user