mirror of
https://github.com/rwinkhart/rcw.git
synced 2026-09-05 08:37:27 -04:00
Specify and solidify usage modes
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@ import (
|
||||
// DecryptWithDaemonIfOpen uses the RCW daemon (if one is available) to
|
||||
// decrypt and return data. If no RCW daemon is accessible, nil is returned.
|
||||
func DecryptWithDaemonIfOpen(encBytes []byte) []byte {
|
||||
if daemonIsOpen() {
|
||||
if IsOpen() {
|
||||
return getDecFromDaemon(encBytes)
|
||||
}
|
||||
return nil
|
||||
@@ -18,7 +18,7 @@ func DecryptWithDaemonIfOpen(encBytes []byte) []byte {
|
||||
// EncryptWithDaemonIfOpen uses the RCW daemon (if one is available) to
|
||||
// encrypt and return data. If no RCW daemon is accessible, nil is returned.
|
||||
func EncryptWithDaemonIfOpen(decBytes []byte) []byte {
|
||||
if daemonIsOpen() {
|
||||
if IsOpen() {
|
||||
return getEncFromDaemon(decBytes)
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user