1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/openssl/ossl.c: use encryptor instead of encrypter in doc.

contributed from @vipulnsward. [fix GH-663]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2014-07-19 16:10:58 +00:00
parent eb95f194ba
commit 2f1ce28358
2 changed files with 15 additions and 10 deletions

View file

@ -1,3 +1,8 @@
Sun Jul 20 01:06:06 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* ext/openssl/ossl.c: use encryptor instead of encrypter in doc.
contributed from @vipulnsward. [fix GH-663]
Sun Jul 20 00:32:44 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (rb_io_initialize): [DOC] fix rdoc of append mode. it does

View file

@ -748,27 +748,27 @@ static void Init_ossl_locks(void)
*
* First set up the cipher for encryption
*
* encrypter = OpenSSL::Cipher.new 'AES-128-CBC'
* encrypter.encrypt
* encrypter.pkcs5_keyivgen pass_phrase, salt
* encryptor = OpenSSL::Cipher.new 'AES-128-CBC'
* encryptor.encrypt
* encryptor.pkcs5_keyivgen pass_phrase, salt
*
* Then pass the data you want to encrypt through
*
* encrypted = encrypter.update 'top secret document'
* encrypted << encrypter.final
* encrypted = encryptor.update 'top secret document'
* encrypted << encryptor.final
*
* === Decryption
*
* Use a new Cipher instance set up for decryption
*
* decrypter = OpenSSL::Cipher.new 'AES-128-CBC'
* decrypter.decrypt
* decrypter.pkcs5_keyivgen pass_phrase, salt
* decryptor = OpenSSL::Cipher.new 'AES-128-CBC'
* decryptor.decrypt
* decryptor.pkcs5_keyivgen pass_phrase, salt
*
* Then pass the data you want to decrypt through
*
* plain = decrypter.update encrypted
* plain << decrypter.final
* plain = decryptor.update encrypted
* plain << decryptor.final
*
* == X509 Certificates
*