MySQLPacketExtraAuthData.decode constructor

MySQLPacketExtraAuthData.decode(
  1. Uint8List buffer
)

Implementation

factory MySQLPacketExtraAuthData.decode(Uint8List buffer) {
  final byteData = ByteData.sublistView(buffer);
  int offset = 0;

  final header = byteData.getUint8(offset);
  offset += 1;

  String pluginData = buffer.getUtf8StringEOF(offset);

  return MySQLPacketExtraAuthData(header: header, pluginData: pluginData);
}