Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Added some example code to the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
artob committed Sep 6, 2010
1 parent e64ec44 commit 64f2c5f
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,31 @@ Features
* 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/>
<http://rsa.rubyforge.org/>

* {RSA::KeyPair}
* {RSA::Key}
* {RSA::PKCS1}

Dependencies
------------
Expand Down

0 comments on commit 64f2c5f

Please sign in to comment.