Doc improvements
authorkoichik <koichik@improvement.jp>
Fri, 29 Jul 2011 18:03:58 +0000 (03:03 +0900)
committerkoichik <koichik@improvement.jp>
Fri, 29 Jul 2011 18:18:33 +0000 (03:18 +0900)
related to #1391, #1415.

doc/api/crypto.markdown
doc/api/http.markdown

index 8a7e5ef..b979d30 100644 (file)
@@ -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.
+
index 5838a0b..bacfbe2 100644 (file)
@@ -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: