How to use the RIPEMD160 function from crypto-js
Find comprehensive JavaScript crypto-js.RIPEMD160 code examples handpicked from public code repositorys.
GitHub: nknorg/nkn-client-js

24 25 26 27 28 29 30 31 32 33
function ripemd160(str) { return CryptoJS.RIPEMD160(str).toString(); } function ripemd160Hex(hexStr) { return CryptoJS.RIPEMD160(cryptoHexStringParse(hexStr)).toString(); } module.exports = { sha256,
+ 3 other calls in file
GitHub: chameleoid/telepathy

146 147 148 149 150 151 152 153 154
SHA3_224: function(data, secret) { return CryptoJS.SHA3(secret + data, { outputLength: 224 }); }, RIPEMD160: function(data, secret) { return CryptoJS.RIPEMD160(secret + data); }, }; })();
+ 9 other calls in file
GitHub: ethers/bitcoinjs-lib

6 7 8 9 10 11 12 13 14
if (!Buffer.isBuffer(buffer)) buffer = new Buffer(buffer) // FIXME: transitionary var step1 = sha256(buffer) var step2a = convert.bytesToWordArray(step1) var step2b = CryptoJS.RIPEMD160(step2a) return new Buffer(convert.wordArrayToBytes(step2b)) }
28 29 30 31 32 33 34 35 36 37
} this.hashAlgorithm = SHA3 break; case "RIPEMD-160": case "RIPEMD160": this.hashAlgorithm = CryptoJS.RIPEMD160 break; default: this.hashAlgorithm = CryptoJS.SHA512 break;
GitHub: mnismt/MyHash

74 75 76 77 78 79 80 81 82 83
}, sha3() { return CryptoJS.SHA3(this.text).toString(); }, ripemd160() { return CryptoJS.RIPEMD160(this.text).toString(); }, hmacmd5() { return CryptoJS.HmacMD5(this.text, this.serect).toString(); },
+ 17 other calls in file
GitHub: otaku/hive-tx-js

16 17 18 19 20 21 22 23 24 25
// return crypto.createHash('ripemd160').update(input).digest() if (typeof input !== 'string') { input = CryptoJS.lib.WordArray.create(input) } const hash = Buffer.from( CryptoJS.RIPEMD160(input).toString(CryptoJS.enc.Hex), 'hex' ) return hash }
GitHub: WatorVapor/dht.mesh

7 8 9 10 11 12 13 14 15 16
constructor() { console.log('DHTUtils::constructor'); } calcAddress(content) { const contentsSha = CryptoJS.SHA3(content).toString(CryptoJS.enc.Hex); const contentRipemd = CryptoJS.RIPEMD160(contentsSha).toString(CryptoJS.enc.Hex); //console.log('DHTUtils::calcAddress:: contentRipemd=<',contentRipemd,'>'); const contentBuffer = Buffer.from(contentRipemd,'hex'); return base32.encode(contentBuffer,bs32Option); }
crypto-js.AES is the most popular function in crypto-js (907 examples)