mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 10:31:02 +00:00
Pad the SHA-1 hash for Gen5 and below servers
This commit is contained in:
@@ -152,7 +152,12 @@
|
||||
else {
|
||||
challengeRespHash = [cryptoMan SHA1HashData: challengeRespHashInput];
|
||||
}
|
||||
NSData* challengeRespEncrypted = [cryptoMan aesEncrypt:challengeRespHash withKey:aesKey];
|
||||
|
||||
assert([challengeRespHash length] <= 32);
|
||||
NSMutableData* paddedHash = [NSMutableData dataWithData:challengeRespHash];
|
||||
[paddedHash setLength:32];
|
||||
|
||||
NSData* challengeRespEncrypted = [cryptoMan aesEncrypt:paddedHash withKey:aesKey];
|
||||
|
||||
HttpResponse* secretResp = [[HttpResponse alloc] init];
|
||||
[_httpManager executeRequestSynchronously:[HttpRequest requestForResponse:secretResp withUrlRequest:[_httpManager newChallengeRespRequest:challengeRespEncrypted]]];
|
||||
|
||||
Reference in New Issue
Block a user