Pad the SHA-1 hash for Gen5 and below servers
This commit is contained in:
parent
a4f7861ccf
commit
abb4b5f9b9
1 changed files with 6 additions and 1 deletions
|
|
@ -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]]];
|
||||
|
|
|
|||
Loading…
Reference in a new issue