finalizeAbsorption method

void finalizeAbsorption()

Finalizes the absorption phase. Applies SHAKE padding (0x1F) and prepares for squeezing.

Implementation

void finalizeAbsorption() {
  if (!_squeezing) {
    // Padding para SHAKE: añadir 0x1F (00011111)
    _buffer[_bufferPos++] = 0x1F;
    while (_bufferPos < _rate) {
      _buffer[_bufferPos++] = 0x00;
    }
    // Establecer el bit final (0x80) en el último byte
    _buffer[_rate - 1] |= 0x80;

    _absorbBlock(_buffer);
    _bufferPos = 0;
    _squeezing = true;
  }
}