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

Doc improvements

related to #1391, #1415.
  • Loading branch information...
1 parent 8b3ba47 commit c72223e2a9aae2d5c20825562657c50a644d8a59 @koichik koichik committed Jul 29, 2011
Showing with 19 additions and 0 deletions.
  1. +15 −0 doc/api/crypto.markdown
  2. +4 −0 doc/api/http.markdown
View
@@ -57,6 +57,8 @@ This can be called many times with new data as it is streamed.
Calculates the digest of all of the passed data to be hashed.
The `encoding` can be `'hex'`, `'binary'` or `'base64'`.
+Note: `hash` object can not be used after `digest()` method been called.
+
### crypto.createHmac(algorithm, key)
@@ -75,6 +77,8 @@ This can be called many times with new data as it is streamed.
Calculates the digest of all of the passed data to the hmac.
The `encoding` can be `'hex'`, `'binary'` or `'base64'`.
+Note: `hmac` object can not be used after `digest()` method been called.
+
### crypto.createCipher(algorithm, password)
@@ -106,6 +110,9 @@ Returns the enciphered contents, and can be called many times with new data as i
Returns any remaining enciphered contents, with `output_encoding` being one of: `'binary'`, `'base64'` or `'hex'`.
+Note: `cipher` object can not be used after `final()` method been called.
+
+
### crypto.createDecipher(algorithm, password)
Creates and returns a decipher object, with the given algorithm and key.
@@ -126,6 +133,8 @@ The `output_decoding` specifies in what format to return the deciphered plaintex
Returns any remaining plaintext which is deciphered,
with `output_encoding` being one of: `'binary'`, `'ascii'` or `'utf8'`.
+Note: `decipher` object can not be used after `final()` method been called.
+
### crypto.createSign(algorithm)
@@ -145,6 +154,9 @@ Calculates the signature on all the updated data passed through the signer.
Returns the signature in `output_format` which can be `'binary'`, `'hex'` or `'base64'`.
+Note: `signer` object can not be used after `sign()` method been called.
+
+
### crypto.createVerify(algorithm)
Creates and returns a verification object, with the given algorithm.
@@ -164,3 +176,6 @@ signature for the data, in the `signature_format` which can be `'binary'`,
`'hex'` or `'base64'`.
Returns true or false depending on the validity of the signature for the data and public key.
+
+Note: `verifier` object can not be used after `verify()` method been called.
+
View
@@ -283,6 +283,8 @@ Note: that Content-Length is given in bytes not characters. The above example
works because the string `'hello world'` contains only single byte characters.
If the body contains higher coded characters then `Buffer.byteLength()`
should be used to determine the number of bytes in a given encoding.
+And Node does not check whether Content-Length and the length of the body
+which has been transmitted are equal or not.
### response.statusCode
@@ -589,6 +591,8 @@ event, the entire body will be caught.
});
This is a `Writable Stream`.
+Note: Node does not check whether Content-Length and the length of the body
+which has been transmitted are equal or not.
This is an `EventEmitter` with the following events:

0 comments on commit c72223e

Please sign in to comment.