Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

doc: update crypto cipher/decipher docs

  • Loading branch information...
bnoordhuis committed Jun 12, 2012
1 parent 900196e commit 8963a5228df69dce6635c5589e2c201af473f3f3
Showing with 8 additions and 5 deletions.
  1. +8 −5 doc/api/crypto.markdown
@@ -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.
On recent releases, `openssl list-cipher-algorithms` will display the
available cipher algorithms.
`password` is used to derive key and IV, which must be `'binary'` encoded
string (See the [Buffer section](buffer.html) for more information).
`password` is used to derive key and IV, which must be a `'binary'` encoded
string or a [buffer](buffer.html).

## crypto.createCipheriv(algorithm, key, 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. `iv` is an Initialization vector. `key` and `iv` must be `'binary'`
encoded string (See the [Buffer section](buffer.html) for more information).
`algorithm` is the same as the argument to `createCipher()`.
`key` is the raw key used by the algorithm.
`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

0 comments on commit 8963a52

Please sign in to comment.
You can’t perform that action at this time.