/* cryptojs v3.1.2 code.google.com/p/crypto-js (c) 2009-2013 by jeff mott. all rights reserved. code.google.com/p/crypto-js/wiki/license */ /** * zero padding strategy. */ cryptojs.pad.zeropadding = { pad: function (data, blocksize) { // shortcut var blocksizebytes = blocksize * 4; // pad data.clamp(); data.sigbytes += blocksizebytes - ((data.sigbytes % blocksizebytes) || blocksizebytes); }, unpad: function (data) { // shortcut var datawords = data.words; // unpad var i = data.sigbytes - 1; while (!((datawords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { i--; } data.sigbytes = i + 1; } };