summaryrefslogtreecommitdiff
path: root/core/src/fdrm/crypto/fx_crypt_aes.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-11 12:05:04 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-11 12:05:04 -0700
commit677b8fffb0c76c009ad808ed91a27738e5420254 (patch)
tree3cf9937569b7ca0cb93b6dfd04ac854f414f9d36 /core/src/fdrm/crypto/fx_crypt_aes.cpp
parent2b5e0d5b20654d116045484868c9e015ed698124 (diff)
downloadpdfium-677b8fffb0c76c009ad808ed91a27738e5420254.tar.xz
Kill FXSYS_mem{cpy,cmp,set.move}{32,8}.
At one point in time, it may have made sense to indicate the expected alignment of the memory you're about to copy, but that was last century. The compiler will take care of it just fine. I stopped short of removing the FXSYS_ wrapper macros entirely. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1179693003.
Diffstat (limited to 'core/src/fdrm/crypto/fx_crypt_aes.cpp')
-rw-r--r--core/src/fdrm/crypto/fx_crypt_aes.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fdrm/crypto/fx_crypt_aes.cpp b/core/src/fdrm/crypto/fx_crypt_aes.cpp
index 4de0f7e752..107bfeace0 100644
--- a/core/src/fdrm/crypto/fx_crypt_aes.cpp
+++ b/core/src/fdrm/crypto/fx_crypt_aes.cpp
@@ -949,7 +949,7 @@ static void aes_decrypt_cbc(unsigned char *dest, const unsigned char *src, int l
unsigned int iv[4], x[4], ct[4];
int i;
ASSERT((len & 15) == 0);
- FXSYS_memcpy32(iv, ctx->iv, sizeof(iv));
+ FXSYS_memcpy(iv, ctx->iv, sizeof(iv));
while (len > 0) {
for (i = 0; i < 4; i++) {
x[i] = ct[i] = GET_32BIT_MSB_FIRST(src + 4 * i);
@@ -963,7 +963,7 @@ static void aes_decrypt_cbc(unsigned char *dest, const unsigned char *src, int l
src += 16;
len -= 16;
}
- FXSYS_memcpy32(ctx->iv, iv, sizeof(iv));
+ FXSYS_memcpy(ctx->iv, iv, sizeof(iv));
}
static void aes_encrypt(AESContext * ctx, unsigned int * block)
{
@@ -974,7 +974,7 @@ static void aes_encrypt_cbc(unsigned char *dest, const unsigned char *src, int l
unsigned int iv[4];
int i;
ASSERT((len & 15) == 0);
- FXSYS_memcpy32(iv, ctx->iv, sizeof(iv));
+ FXSYS_memcpy(iv, ctx->iv, sizeof(iv));
while (len > 0) {
for (i = 0; i < 4; i++) {
iv[i] ^= GET_32BIT_MSB_FIRST(src + 4 * i);
@@ -987,7 +987,7 @@ static void aes_encrypt_cbc(unsigned char *dest, const unsigned char *src, int l
src += 16;
len -= 16;
}
- FXSYS_memcpy32(ctx->iv, iv, sizeof(iv));
+ FXSYS_memcpy(ctx->iv, iv, sizeof(iv));
}
void CRYPT_AESSetKey(void* context, FX_DWORD blocklen, const uint8_t* key, FX_DWORD keylen, FX_BOOL bEncrypt)
{