node: definition of the module "crypto" has been changed

This commit is contained in:
Ilya Mochalov
2016-01-12 01:54:02 +05:00
parent 627b6c158b
commit 39e510415c
2 changed files with 14 additions and 7 deletions
+7
View File
@@ -203,6 +203,13 @@ function stream_readable_pipe_test() {
var hmacResult: string = crypto.createHmac('md5', 'hello').update('world').digest('hex');
{
let hmac: crypto.Hmac;
(hmac = crypto.createHmac('md5', 'hello')).end('world', 'utf8', () => {
let hash: Buffer|string = hmac.read();
});
}
function crypto_cipher_decipher_string_test() {
var key:Buffer = new Buffer([1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7]);
var clearText:string = "This is the clear text.";