Significant enhancements to secure data handling (especially on iOS)

This commit is contained in:
2026-02-07 23:07:26 -05:00
parent 0e232a5fdd
commit bfc6d97773
9 changed files with 82 additions and 75 deletions
+3 -1
View File
@@ -6,6 +6,8 @@ package main
// #include "types.h"
import "C"
import (
"unsafe"
"github.com/rwinkhart/libmutton/clip"
)
@@ -27,7 +29,7 @@ func ClearProcess(assignedContents C.PascalString) *C.char {
//
//export CopyShortcut
func CopyShortcut(realPath C.PascalString, field int, rcwPassword C.PascalString) *C.char {
if err := clip.CopyShortcut(C.GoStringN(realPath.data, realPath.len), field, []byte(C.GoStringN(rcwPassword.data, rcwPassword.len))); err != nil {
if err := clip.CopyShortcut(C.GoStringN(realPath.data, realPath.len), field, C.GoBytes(unsafe.Pointer(rcwPassword.data), rcwPassword.len)); err != nil {
return C.CString(err.Error())
}
return nil