Something went wrong. Try again.
Securely use keys during development
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334#+privatepackage keychain
import "core:sys/darwin/CoreFoundation"import "core:sys/darwin/Security"
foreign import Sec "system:Security.framework"
@(link_prefix = "Sec", default_calling_convention = "c")foreign Sec { // core:sys/darwin/Security doesn't have these @(link_name = "kSecAttrService") kSecAttrService: CoreFoundation.String @(link_name = "kSecClass") kSecClass: CoreFoundation.String @(link_name = "kSecClassGenericPassword") kSecClassGenericPassword: CoreFoundation.String @(link_name = "kSecMatchLimit") kSecMatchLimit: CoreFoundation.String @(link_name = "kSecMatchLimitAll") kSecMatchLimitAll: CoreFoundation.String @(link_name = "kSecMatchLimitOne") kSecMatchLimitOne: CoreFoundation.String @(link_name = "kSecReturnAttributes") kSecReturnAttributes: CoreFoundation.String @(link_name = "kSecReturnData") kSecReturnData: CoreFoundation.String @(link_name = "kSecValueData") kSecValueData: CoreFoundation.String
ItemAdd :: proc(query: Dictionary, result: ^CoreFoundation.TypeRef) -> Security.errSec --- ItemCopyMatching :: proc(query: Dictionary, result: ^CoreFoundation.TypeRef) -> Security.errSec --- ItemDelete :: proc(query: Dictionary) -> Security.errSec ---}