deriveChallenge function
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;
}