Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 132 lines (94 sloc) 4.0 kB
7c31e04 @bendiken Updated YARD documentation settings.
bendiken authored
1 OpenPGP.rb: OpenPGP for Ruby
2 ============================
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
3
4 This is a pure-Ruby implementation of the OpenPGP Message Format (RFC 4880).
5
6 * <http://github.com/bendiken/openpgp>
7
8 ### About OpenPGP
9
10 OpenPGP is the most widely-used e-mail encryption standard in the world. It
11 is defined by the OpenPGP Working Group of the Internet Engineering Task
12 Force (IETF) Proposed Standard RFC 4880. The OpenPGP standard was originally
13 derived from PGP (Pretty Good Privacy), first created by Phil Zimmermann in
14 1991.
15
16 * <http://tools.ietf.org/html/rfc4880>
17 * <http://www.openpgp.org/>
18
bf01237 @bendiken Improved formatting.
bendiken authored
19 Features
20 --------
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
21
22 * Encodes and decodes ASCII-armored OpenPGP messages.
23 * Parses OpenPGP messages into their constituent packets.
24 * Supports both old-format (PGP 2.6.x) and new-format (RFC 4880) packets.
25 * Includes a GnuPG wrapper for features that are not natively supported.
26
bf01237 @bendiken Improved formatting.
bendiken authored
27 Examples
28 --------
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
29
233e375 @bendiken Updated the README.
bendiken authored
30 require 'rubygems'
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
31 require 'openpgp'
32
33 ### Decoding an ASCII-armored message
34
35 require 'open-uri'
233e375 @bendiken Updated the README.
bendiken authored
36 text = open('http://openpgp.rubyforge.org/pgp.txt').read
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
37
38 msg = OpenPGP::Message.parse(OpenPGP.dearmor(text))
39
40 ### Generating a new keypair
41
42 gpg = OpenPGP::Engine::GnuPG.new(:homedir => '~/.gnupg')
43 key_id = gpg.gen_key({
44 :key_type => 'DSA',
45 :key_length => 1024,
46 :subkey_type => 'ELG-E',
47 :subkey_length => 1024,
48 :name => 'J. Random Hacker',
49 :comment => nil,
50 :email => 'jhacker@example.org',
51 :passphrase => 'secret passphrase',
52 })
53
bf01237 @bendiken Improved formatting.
bendiken authored
54 Documentation
55 -------------
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
56
57 * <http://openpgp.rubyforge.org/>
58
f6cf24e @bendiken Updated the README.
bendiken authored
59 Dependencies
60 ------------
61
62 * [Ruby](http://ruby-lang.org/) (>= 1.8.7) or (>= 1.8.1 with [Backports][])
63 * [Open4](http://rubygems.org/gems/open4) (>= 1.0.1)
64
65 Installation
66 ------------
67
68 The recommended installation method is via [RubyGems](http://rubygems.org/).
69 To install the latest official release of OpenPGP.rb, do:
70
71 % [sudo] gem install openpgp # Ruby 1.8.7+ or 1.9.x
72 % [sudo] gem install backports openpgp # Ruby 1.8.1+
73
bf01237 @bendiken Improved formatting.
bendiken authored
74 Download
75 --------
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
76
77 To get a local working copy of the development repository, do:
78
79 % git clone git://github.com/bendiken/openpgp.git
80
81 Alternatively, you can download the latest development version as a tarball
82 as follows:
83
84 % wget http://github.com/bendiken/openpgp/tarball/master
85
bf01237 @bendiken Improved formatting.
bendiken authored
86 Resources
87 ---------
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
88
89 * <http://openpgp.rubyforge.org/>
90 * <http://github.com/bendiken/openpgp>
f6cf24e @bendiken Updated the README.
bendiken authored
91 * <http://rubygems.org/gems/openpgp>
233e375 @bendiken Updated the README.
bendiken authored
92 * <http://rubyforge.org/projects/openpgp/>
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
93 * <http://raa.ruby-lang.org/project/openpgp/>
94 * <http://www.ohloh.net/p/openpgp>
95
bf01237 @bendiken Improved formatting.
bendiken authored
96 Authors
97 -------
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
98
99 * [Arto Bendiken](mailto:arto.bendiken@gmail.com) - <http://ar.to/>
b729f7d @bendiken Added a contributor list and some contributor instructions.
bendiken authored
100
101 Contributors
102 ------------
103
104 * [Kévin Lacointe](mailto:kevinlacointe@gmail.com) - <http://github.com/klacointe>
105
106 Contributing
107 ------------
108
109 * Do your best to adhere to the existing coding conventions and idioms.
110 * Don't use hard tabs, and don't leave trailing whitespace on any line.
111 * Do document every method you add using [YARD][] annotations. Read the
112 [tutorial][YARD-GS] or just look at the existing code for examples.
113 * Don't touch the `.gemspec` or `VERSION` files. If you need to change them,
114 do so on your private branch only.
115 * Do feel free to add yourself to the `CONTRIBUTORS` file and the
116 corresponding list in the the `README`. Alphabetical order applies.
117 * Don't touch the `AUTHORS` file. If your contributions are significant
118 enough, be assured we will eventually add you in there.
119 * Do note that in order for us to merge any non-trivial changes (as a rule
120 of thumb, additions larger than about 15 lines of code), we need an
121 explicit [public domain dedication][PDD] on record from you.
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
122
bf01237 @bendiken Improved formatting.
bendiken authored
123 License
124 -------
da5d246 @bendiken Changed README format from RDoc to Markdown.
bendiken authored
125
126 OpenPGP.rb is free and unencumbered public domain software. For more
127 information, see <http://unlicense.org/> or the accompanying UNLICENSE file.
b729f7d @bendiken Added a contributor list and some contributor instructions.
bendiken authored
128
129 [YARD]: http://yardoc.org/
ec1f2d8 @bendiken Updated the YARD tutorial link.
bendiken authored
130 [YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
233e375 @bendiken Updated the README.
bendiken authored
131 [PDD]: http://unlicense.org/#unlicensing-contributions
Something went wrong with that request. Please try again.