New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rsa

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rsa

  • 0.1.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

RSA.rb: RSA Encryption for Ruby

RSA.rb is a Ruby library that implements the RSA encryption algorithm and the PKCS#1 cryptography standard.

Features

  • 100% free and unencumbered public domain software.
  • Implements the PKCS#1 data conversion primitives (I2OSP and OS2IP).
  • Implements the PKCS#1 encryption/decryption primitives (RSAEP and RSADP).
  • Implements the PKCS#1 signature primitives (RSASP1 and RSAVP1).
  • Implements RSA key pair generation using Ruby's OpenSSL standard library.
  • Compatible with Ruby 1.9.1+ and JRuby 1.5.0+.
  • Compatible with older Ruby versions with the help of the Backports gem.

Examples

require 'rsa'

Generating a new RSA key pair

key_pair = RSA::KeyPair.generate(128)

Encrypting a plaintext message

ciphertext = key_pair.encrypt("Hello, world!")

Decrypting a ciphertext message

plaintext = key_pair.decrypt(ciphertext)

Documentation

http://rsa.rubyforge.org/

  • {RSA::KeyPair}
  • {RSA::Key}
  • {RSA::PKCS1}

Dependencies

Installation

The recommended installation method is via RubyGems. To install the latest official release of RSA.rb, do:

% [sudo] gem install rsa             # Ruby 1.9.1+
% [sudo] gem install backports rsa   # Ruby 1.8.x

Download

To get a local working copy of the development repository, do:

% git clone git://github.com/bendiken/rsa.git

Alternatively, you can download the latest development version as a tarball as follows:

% wget http://github.com/bendiken/rsa/tarball/master

Author

Contributors

Refer to the accompanying {file:CREDITS} file.

Contributing

  • Do your best to adhere to the existing coding conventions and idioms.
  • Don't use hard tabs, and don't leave trailing whitespace on any line.
  • Do document every method you add using YARD annotations. Read the tutorial or just look at the existing code for examples.
  • Don't touch the .gemspec, VERSION or AUTHORS files. If you need to change them, do so on your private branch only.
  • Do feel free to add yourself to the CREDITS file and the corresponding list in the the README. Alphabetical order applies.
  • Do note that in order for us to merge any non-trivial changes (as a rule of thumb, additions larger than about 15 lines of code), we need an explicit public domain dedication on record from you.

License

This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying {file:UNLICENSE} file.

FAQs

Package last updated on 17 Oct 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc