Microsoft RSA key blob
Exchange RSA keys between Microsoft CSP blob format (ExportCspBlob, ImportCspBlob of RSACryptoServiceProvider) and ruby openssl key OpenSSL::PKey::RSA
Usage
Create key from blob created by ExportCspBlob
blob = File.binread 'msblob.bin'
key = OpenSSL::PKey::RSA.from_mskeyblob blob
Create blob for ExportCspBlob
key = OpenSSL::PKey::RSA.new 2048
blob = key.to_mskeyblob
public_blob = key.to_mskeyblob(include_private: false)
Installation
Add this line to your application's Gemfile:
gem 'mskeyblob'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mskeyblob
Contributing
- Fork it ( https://github.com/Ziaw/mskeyblob/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request