deriveChallenge function

Uint8List deriveChallenge(
  1. Uint8List sessionId,
  2. String userName,
  3. String serviceName,
  4. String methodName,
  5. String algoName,
  6. Uint8List secret,
)

Implementation

Uint8List deriveChallenge(Uint8List sessionId, String userName,
    String serviceName, String methodName, String algoName, Uint8List secret) {
  SerializableOutput output = SerializableOutput(Uint8List(2 +
      4 * 6 +
      sessionId.length +
      userName.length +
      serviceName.length +
      methodName.length +
      algoName.length +
      secret.length));
  serializeString(output, sessionId);
  output.addUint8(MSG_USERAUTH_REQUEST.ID);
  serializeString(output, userName);
  serializeString(output, serviceName);
  serializeString(output, methodName);
  output.addUint8(1);
  serializeString(output, algoName);
  serializeString(output, secret);
  if (!output.done) {
    throw FormatException('${output.offset}/${output.buffer.length}');
  }
  return output.buffer;
}