From 8963a5228df69dce6635c5589e2c201af473f3f3 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 12 Jun 2012 22:02:35 +0200 Subject: [PATCH] doc: update crypto cipher/decipher docs --- doc/api/crypto.markdown | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index 3537fc13b90..969c7ecad12 100644 --- a/doc/api/crypto.markdown +++ b/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