diff options
author | koichik <koichik@improvement.jp> | 2011-07-29 22:03:58 +0400 |
---|---|---|
committer | koichik <koichik@improvement.jp> | 2011-07-29 22:18:33 +0400 |
commit | c72223e2a9aae2d5c20825562657c50a644d8a59 (patch) | |
tree | 9725e93627fc140806e73c7b9dd10d949871808e /doc | |
parent | 8b3ba47f88e5f59256818e3173c75c66ff5a82df (diff) |
Doc improvements
related to #1391, #1415.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/crypto.markdown | 15 | ||||
-rw-r--r-- | doc/api/http.markdown | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index 8a7e5efac32..b979d30e8a0 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -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. + diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 5838a0b3dbe..bacfbe2288b 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -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: |