docs: private ByteBuffer encryptPacket(ByteBuffer packet) {
          final ByteBuffer payload = (ByteBuffer) ByteBuffer.allocate(SHA1_LENGTH + packet.remaining())
                  .put(sha1(packet))
                  .put((ByteBuffer) packet.flip())
                  .flip();
          final EncryptionResult er = encrypt(password, payload);
          return (ByteBuffer) ByteBuffer.allocate(BUFFER_SIZE)
                  .putShort((short) TYPE_ENCR_AES256)
                  .putShort((short) (ENCRYPT_DATA_LEN + username.length + er.output.remaining()))
                  .putShort((short) username.length)
                  .put(username)
                  .put(er.iv)
                  .put(er.output)
                  .flip();
      }