# MacKeychainKeyStore class

Namespace: [Grasshopper2.Components.Descriptive](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.components.descriptive.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class MacKeychainKeyStore : IAiKeyStore
```

macOS implementation of [IAiKeyStore](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.iaikeystore.md). Stores each key in the user's login keychain via the `/usr/bin/security` command-line tool, under a per-provider service name. The key is encrypted at rest by the OS and gated by the user's login. Caveat: during Set/Delete the API key briefly appears as an argument in process listings. The keychain entry itself is properly encrypted. A future improvement would be P/Invoke to Security.framework's SecKeychain APIs directly, which avoids the argv exposure.

## Methods

- [DeleteKey](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.mackeychainkeystore/deletekey.md)
- [SetKey](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.mackeychainkeystore/setkey.md)
- [TryGetKey](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.mackeychainkeystore/trygetkey.md)
