Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
doc: update crypto cipher/decipher docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Jun 12, 2012
1 parent 900196e commit 8963a52
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions doc/api/crypto.markdown
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -111,16 +111,19 @@ Creates and returns a cipher object, with the given algorithm and password.
`algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc.
On recent releases, `openssl list-cipher-algorithms` will display the On recent releases, `openssl list-cipher-algorithms` will display the
available cipher algorithms. available cipher algorithms.
`password` is used to derive key and IV, which must be `'binary'` encoded `password` is used to derive key and IV, which must be a `'binary'` encoded
string (See the [Buffer section](buffer.html) for more information). string or a [buffer](buffer.html).


## crypto.createCipheriv(algorithm, key, iv) ## crypto.createCipheriv(algorithm, key, iv)


Creates and returns a cipher object, with the given algorithm, key and iv. Creates and returns a cipher object, with the given algorithm, key and iv.


`algorithm` is the same as the `createCipher()`. `key` is a raw key used in `algorithm` is the same as the argument to `createCipher()`.
algorithm. `iv` is an Initialization vector. `key` and `iv` must be `'binary'` `key` is the raw key used by the algorithm.
encoded string (See the [Buffer section](buffer.html) for more information). `iv` is an [initialization
vector](http://en.wikipedia.org/wiki/Initialization_vector).

`key` and `iv` must be `'binary'` encoded strings or [buffers](buffer.html).


## Class: Cipher ## Class: Cipher


Expand Down

0 comments on commit 8963a52

Please sign in to comment.