summaryrefslogtreecommitdiff
path: root/core/fdrm/crypto/fx_crypt_sha.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2017-05-22 15:58:52 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-22 23:01:53 +0000
commit355954b8f09a65934b95dd6ca1299a73ae5e24b2 (patch)
treebb1e31e73d9fef7e67ab117b0e9c9093908e75e9 /core/fdrm/crypto/fx_crypt_sha.cpp
parented75ee25f40a475f774e1e06c5375feee70b56f5 (diff)
downloadpdfium-355954b8f09a65934b95dd6ca1299a73ae5e24b2.tar.xz
Fix crypto calculation regression due to typo
Use the correct values to calculate SHA512. BUG=pdfium:727,chromium:725267 Change-Id: I63d257c1df6304019a70f53df4653d358d3db525 Reviewed-on: https://pdfium-review.googlesource.com/5770 Commit-Queue: Wei Li <weili@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fdrm/crypto/fx_crypt_sha.cpp')
-rw-r--r--core/fdrm/crypto/fx_crypt_sha.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fdrm/crypto/fx_crypt_sha.cpp b/core/fdrm/crypto/fx_crypt_sha.cpp
index 7420a32d48..812700d9cd 100644
--- a/core/fdrm/crypto/fx_crypt_sha.cpp
+++ b/core/fdrm/crypto/fx_crypt_sha.cpp
@@ -587,14 +587,14 @@ void CRYPT_SHA512Start(CRYPT_sha2_context* ctx) {
return;
memset(ctx, 0, sizeof(CRYPT_sha2_context));
- ctx->state[0] = 0xa09e667f3bcc908ULL;
- ctx->state[1] = 0xb67ae8584caa73bULL;
- ctx->state[2] = 0xc6ef372fe94f82bULL;
- ctx->state[3] = 0x54ff53a5f1d36f1ULL;
- ctx->state[4] = 0x10e527fade682d1ULL;
- ctx->state[5] = 0xb05688c2b3e6c1fULL;
- ctx->state[6] = 0xf83d9abfb41bd6bULL;
- ctx->state[7] = 0xbe0cd19137e2179ULL;
+ ctx->state[0] = 0x6a09e667f3bcc908ULL;
+ ctx->state[1] = 0xbb67ae8584caa73bULL;
+ ctx->state[2] = 0x3c6ef372fe94f82bULL;
+ ctx->state[3] = 0xa54ff53a5f1d36f1ULL;
+ ctx->state[4] = 0x510e527fade682d1ULL;
+ ctx->state[5] = 0x9b05688c2b3e6c1fULL;
+ ctx->state[6] = 0x1f83d9abfb41bd6bULL;
+ ctx->state[7] = 0x5be0cd19137e2179ULL;
}
void CRYPT_SHA512Update(CRYPT_sha2_context* ctx,