mirror of
https://github.com/rwinkhart/rcw.git
synced 2026-10-27 06:09:57 -04:00
Implement sanity check in example program
This commit is contained in:
1 parent
baad84563e
commit
ec358c6d0c
3 files changed
+22
-4
No files matched your search
@@ -8,8 +8,9 @@ import (
|
||||
// GenSanityCheck creates an encrypted file containing known plaintext
|
||||
// to later be used for ensuring the user does not encrypt data with
|
||||
// an incorrect passphrase.
|
||||
func GenSanityCheck(path string, passphrase []byte) {
|
||||
os.WriteFile(path, Encrypt([]byte("thx4usin'rcw"), passphrase), 0600)
|
||||
func GenSanityCheck(path string, passphrase []byte) error {
|
||||
err := os.WriteFile(path, Encrypt([]byte("thx4usin'rcw"), passphrase), 0600)
|
||||
return err
|
||||
}
|
||||
|
||||
// RunSanityCheck should be run before any encryption operation
|
||||
|
||||
Reference in new issue
Block a user