processBlock method
Process a whole block of data given by inp
and starting at offset
inpOff
.
The resulting cipher text is put in out
beginning at position outOff
.
This method returns the total bytes processed (which is the same as the block size of the algorithm).
Implementation
@override
int processBlock(Uint8List inp, int inpOff, Uint8List out, int outOff) {
if ((inpOff + (32 / 2)) > inp.lengthInBytes) {
throw ArgumentError('Input buffer too short');
}
if ((outOff + (32 / 2)) > out.lengthInBytes) {
throw ArgumentError('Output buffer too short');
}
if (_forEncryption) {
_encryptBlock(inp, inpOff, out, outOff, _WorkingKey);
} else {
_decryptBlock(inp, inpOff, out, outOff, _WorkingKey);
}
return _BLOCK_SIZE;
}