commit node_modules and generated files
This commit is contained in:
parent
6d7a135fea
commit
34b372292b
3379 changed files with 449603 additions and 2029 deletions
16
node_modules/browserify-aes/modes/ofb.js
generated
vendored
Normal file
16
node_modules/browserify-aes/modes/ofb.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
var xor = require('buffer-xor')
|
||||
|
||||
function getBlock (self) {
|
||||
self._prev = self._cipher.encryptBlock(self._prev)
|
||||
return self._prev
|
||||
}
|
||||
|
||||
exports.encrypt = function (self, chunk) {
|
||||
while (self._cache.length < chunk.length) {
|
||||
self._cache = Buffer.concat([self._cache, getBlock(self)])
|
||||
}
|
||||
|
||||
var pad = self._cache.slice(0, chunk.length)
|
||||
self._cache = self._cache.slice(chunk.length)
|
||||
return xor(chunk, pad)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue