Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Announcing KeyChain.NET: A Unified API for Using KeyChain on Many Platforms

DZone's Guide to

Announcing KeyChain.NET: A Unified API for Using KeyChain on Many Platforms

KeyChain protects your data by storing keys in a secure database. Learn how to use it on multiple platforms with a unified API.

· Integration Zone
Free Resource

Modernize your application architectures with microservices and APIs with best practices from this free virtual summit series. Brought to you in partnership with CA Technologies.

The latest version of KeyChain.Net (0.0.4) now available and it supports Windows Phone, thanks to the contribution of Marco.

Storing and accessing private keys and passwords can be a tricky task. How far do you need to go to protect your (and the user’s) data? This is where KeyChain on iOS comes in handy. It allows you to store keys in an (arguably) secure database. This has seen great improvements since iOS 8 and iOS devices (since iPhone 5S) equipped with a special A7 chip designed particularly for holding your keys. More on iOS KeyChain can be found on Apple’s website here. Android, on the other side has its KeyStore, which also gives you some level of protection, but leaves a major part of the implementation to your (the developer). Details of Android KeyStore can be found on Android SDK here.

While working on recent projects, I found myself needing to have a unified way of accessing the KeyChain on both platforms. I implemented the generic library and it’s been working very well, so I thought it would be nice to share the love with the community, so here it comes.

KeyChain.Net offers developers a unified, simple-to-use API for storing, accessing, and deleting keys from the keyChain (or KeyStore). It also offers further customization capabilities based on what the platform supports. For instance, iOS KeyChain supports seamless sync (of your private keys) with other iOS devices using iCloud. This can be achieved using KeyChain.Net by turning ON the autoSyncToiCloud setting.

The package is open source and it is hosted on GitHub here. Currently, I am supporting Xamarin iOS and Xamarin Android. I might add Windows Phone depending on the feedback I get.

The library can be found on Nuget here. I have put some sample code on the read.me file on GitHub, and you could also look at the unit tests for information on how to use it. Tests are also available on GitHub.

Feel free to fork the repo on GitHub and use it in any way you like or simply pull the Nuget package to your project and enjoy it. I would appreciate all feedback and if you have any issues or feature requests then please log them on GitHub.

The Integration Zone is proudly sponsored by CA Technologies. Learn from expert microservices and API presentations at the Modernizing Application Architectures Virtual Summit Series.

Topics:
integration ,api ,keychain ,security

Published at DZone with permission of Has Altaiar. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}