-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathtst.js
More file actions
84 lines (54 loc) · 2.3 KB
/
tst.js
File metadata and controls
84 lines (54 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
asmCrypto.SHA256.hex(input);
asmCrypto.AES_OFB.encrypt(input, key, iv)
var jwcrypto = require("browserid-crypto");
jwcrypto.generateKeypair({algorithm: 'DSA'}, function(err, keypair) {
jwcrypto.sign(input, keypair.secretKey);
});
const crypto = require('crypto');
const cipher = crypto.createCipher('aes192', 'a password');
let encrypted1 = cipher.update('input1', 'utf8', 'hex');
let encrypted2 = cipher.write('input2', 'utf8', 'hex');
const crypto = require('crypto');
const hash = crypto.createHash('sha256');
hash.update('input1');
hash.write('input2');
const crypto = require('crypto');
const hmac = crypto.createHmac('sha256', 'a secret');
hmac.update('input1');
hmac.write('input2');
const crypto = require('crypto');
const sign = crypto.createSign('SHA256');
sign.update('input1');
sign.write('input2');
var crypto = require('crypto');
var cipher = crypto.createCipher('aes-192-ecb', 'a password');
cipher.update('input1', 'utf8', 'hex');
cipher.write('input2', 'utf8', 'hex');
var CryptoJS = require("crypto-js");
CryptoJS.AES.encrypt('my message', 'secret key 123');
var CryptoJS = require("crypto-js");
CryptoJS.SHA1("Message", "Key");
var CryptoJS = require("crypto-js");
CryptoJS.HmacSHA1("Message", "Key");
require("crypto-js/aes").encrypt('my message', 'secret key 123');
require("crypto-js/sha1")("Message", "Key");
var CryptoJS = require("crypto-js");
var opts = { mode: CryptoJS.mode.CFB }
CryptoJS.AES.encrypt("msg", "key", opts)
require("nacl").sign('my message');
require("nacl").hash('my message');
require("nacl-fast").sign('my message');
require("nacl-fast").hash('my message');
require('hash.js').sha256().update('abc').digest('hex')
require('hash.js/lib/hash/sha/512')().update('abc').digest('hex');
require("forge").md.md5.create().update('The quick brown fox jumps over the lazy dog');
require("node-forge").md.md5.create().update('The quick brown fox jumps over the lazy dog');
require("forge").rc2.createEncryptionCipher(key).update("secret");
require("forge").cipher.createCipher('3DES-CBC', key).update("secret");
require("md5")("message");
require("bcrypt").hash(password);
require("bcrypt").hashSync(password);
require("bcryptjs").hash(password);
require("bcrypt-nodejs").hash(password);
require('hasha')('unicorn', { algorithm: "md5" });
require("express-jwt").sign(m, "secret", {});