docs: public byte[] encrypt(byte[] plainData) {
      checkArgument(plainData.length >= OVERHEAD_SIZE,
          "Invalid plainData, %s bytes", plainData.length);
  
      // workBytes := initVector || payload || zeros:4
      byte[] workBytes = plainData.clone();
      ByteBuffer workBuffer = ByteBuffer.wrap(workBytes);
      boolean success = false;
  
      try {
        // workBytes := initVector || payload || I(signature)
        int signature = hmacSignature(workBytes);
        workBuffer.putInt(workBytes.length - SIGNATURE_SIZE, signature);
        // workBytes := initVector || E(payload) || I(signature)
        xorPayloadToHmacPad(workBytes);
  
        if (logger.isDebugEnabled()) {
          logger.debug(dump("Encrypted", plainData, workBytes));
        }
  
        success = true;
        return workBytes;
      } finally {
        if (!success && logger.isDebugEnabled()) {
          logger.debug(dump("Encrypted (failed)", plainData, workBytes));
        }
      }
    }