flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
30
BACK_BACK/node_modules/hash.js/lib/hash/sha/224.js
generated
vendored
Executable file
30
BACK_BACK/node_modules/hash.js/lib/hash/sha/224.js
generated
vendored
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
'use strict';
|
||||
|
||||
var utils = require('../utils');
|
||||
var SHA256 = require('./256');
|
||||
|
||||
function SHA224() {
|
||||
if (!(this instanceof SHA224))
|
||||
return new SHA224();
|
||||
|
||||
SHA256.call(this);
|
||||
this.h = [
|
||||
0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
|
||||
0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];
|
||||
}
|
||||
utils.inherits(SHA224, SHA256);
|
||||
module.exports = SHA224;
|
||||
|
||||
SHA224.blockSize = 512;
|
||||
SHA224.outSize = 224;
|
||||
SHA224.hmacStrength = 192;
|
||||
SHA224.padLength = 64;
|
||||
|
||||
SHA224.prototype._digest = function digest(enc) {
|
||||
// Just truncate output
|
||||
if (enc === 'hex')
|
||||
return utils.toHex32(this.h.slice(0, 7), 'big');
|
||||
else
|
||||
return utils.split32(this.h.slice(0, 7), 'big');
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue