UNPKG

triplesec

Version:

A CommonJS-compliant system for secure encryption of smallish secrets

38 lines (25 loc) 996 B
// Generated by IcedCoffeeScript 108.0.8 (function() { var Hasher, KECCAK, SHA3STD, WordArray, transform, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; WordArray = require('./wordarray').WordArray; Hasher = require('./algbase').Hasher; KECCAK = require('./keccak').KECCAK; SHA3STD = (function(_super) { __extends(SHA3STD, _super); function SHA3STD() { return SHA3STD.__super__.constructor.apply(this, arguments); } SHA3STD.prototype.pad = 0x06; return SHA3STD; })(KECCAK); transform = function(x) { var out; out = (new SHA3STD).finalize(x); x.scrub(); return out; }; exports.SHA3STD = SHA3STD; exports.transform = transform; }).call(this);