gpt4 book ai didi

xmpp tls 响应格式

转载 作者:太空宇宙 更新时间:2023-11-03 15:07:16 25 4
gpt4 key购买 nike

在收到质询后,我似乎无法找到应该在 TLS 响应中包含什么格式。我在哪里可以找到该信息?

假设我是用 PHP 做的,它应该是这样的:

$nonce = "somenoncevaluehere";
$qop = "auth";
$charset = "utf-8";
$algorithm = "md5-sess";
$server = "example.com";
$user = "bob";
$pass = "somepass";

$md5Response = "realm=$server,nonce=$nonce,qop=$qop,charset=$charset,algorithm=$algorithm,xmpp,$server,$user,$pass";

最佳答案

我找到了一个 cocoa version

NSMutableString *buffer = [NSMutableString stringWithCapacity:100];
[buffer appendFormat:@"username=\"%@\",", username];
[buffer appendFormat:@"realm=\"%@\",", realm];
[buffer appendFormat:@"nonce=\"%@\",", nonce];
[buffer appendFormat:@"cnonce=\"%@\",", cnonce];
[buffer appendFormat:@"nc=00000001,"];
[buffer appendFormat:@"qop=auth,"];
[buffer appendFormat:@"digest-uri=\"%@\",", digestURI];
[buffer appendFormat:@"response=%@,", [self response]];
[buffer appendFormat:@"charset=utf-8"];

NSLog(@"decoded response: %@", buffer);

NSData *utf8data = [buffer dataUsingEncoding:NSUTF8StringEncoding];

return [utf8data encodeBase64];

关于xmpp tls 响应格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4369313/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com