Make adjustments for easier CGO integration

This commit is contained in:
RandyTheSilly committed 2026-01-21 18:35:26 -05:00
1 parent f82b35bc43
commit 48e084ac0f
7 files changed
+49 -37

No files matched your search

+3 -2
View File
@@ -13,7 +13,8 @@ import (
// CopyShortcut (given a path) decrypts an
// entry and copies a field to the clipboard.
func CopyShortcut(realPath string, field int) error {
// Leave rcwPassword nil to use RCW demonization.
func CopyShortcut(realPath string, field int, rcwPassword []byte) error {
// ensure realPath exists and is a file
_, err := back.TargetIsFile(realPath, true)
if err != nil {
@@ -21,7 +22,7 @@ func CopyShortcut(realPath string, field int) error {
}
// decrypt entry
decSlice, err := crypt.DecryptFileToSlice(realPath)
decSlice, err := crypt.DecryptFileToSlice(realPath, rcwPassword)
if err != nil {
return errors.New("unable to decrypt entry: " + err.Error())
}