Wrapper library for accessing operating system key chains.
- Zig 83.4%
- Objective-C 16.6%
| .idea | chore[clion]: update project configuration to version 0.2.0 and adjust module imports | |
| src | refactor: update to Zig 0.16.0-dev.2962+08416b44f | |
| .gitignore | feat: add label support | |
| build.zig |
turn xcode_frameworks into an optional dependency
|
|
| build.zig.zon | refactor: update to Zig 0.16.0-dev.2962+08416b44f | |
| LICENSE | chore: add MIT license | |
| readme.md |
refactor: replace createAccount with updateAccount to allow both creation and updates, update related docs and tests
|
|
Zig-Keychain
Access credential stores from Zig.
The library provides a constant interface for accessing different credential storage systems. Currently, the only real implementation is for the macOS KeyChain, but Linux- and Windows-specific implementations are planned. For the time being, a simple plain-text file implementation is provided as a fallback and for testing.
Scopes
All keychain instances require a scope. The scope is stored on every user account and server. Each application
should use a unique scope to avoid conflicts with other applications.
Progress
| Function | macOS KeyChain | Plain Text | Windows |
|---|---|---|---|
| kc.updateAccount | ✓ | ✓ | |
| kc.deleteAccount | ✓ | ✓ | |
| kc.getPasssword | ✓ | ✓ | |
| kc.setPasssword | ✓ | ✓ | |
| kc.getLabel | ✓ | ✓ | |
| kc.setLabel | ✓ | ✓ | |
| kc.getServers | ✓ | ✓ | |
| kc.getUsers | ✓ | ✓ | |
| kc.createKeyPair | ✓ | ✓ | |
| kc.deleteKeyPair | |||
| kc.getPublicKey | ✓ | ✓ | |
| kc.encrypt | |||
| kc.decrypt | |||
| kc.sign | |||
| kc.verify |
See the full interface in src/KeyChain.zig.
See usage examples in src/root.zig.