Zig API Reference: zig-keychain¶
keychain.zig¶
Platform keychain abstraction
Types¶
Result (union)¶
Platform-independent keychain lookup result. On success, the returned slice aliases the caller-provided output buffer passed to lookup.
Functions¶
store¶
Store a generic secret in the platform keychain.
lookup¶
Look up a generic secret from the platform keychain.
delete¶
Delete a generic secret from the platform keychain.
search¶
Search for keychain items matching an account name. Writes matching service names as null-separated strings into out_buf. Returns the number of matches found.
keychain_linux.zig¶
Linux libsecret backend
Functions¶
store¶
lookup¶
delete¶
search¶
keychain_macos.zig¶
macOS Security.framework backend
Functions¶
store¶
Store a generic password via SecItemAdd.
lookup¶
Look up a generic password via SecItemCopyMatching.
delete¶
Delete a generic password via SecItemDelete.
search¶
Search for keychain items matching an account name. Writes matching service names as null-separated strings into out_buf. Returns the number of matches found, or an error.
root.zig¶
Public Zig package API for zig-keychain.
Constants¶
keychainResultstorelookupdeletesearch