From 454537d53efd0579d4cd2a48108f3bdb490b08d2 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 5 Aug 2022 15:39:00 +0200 Subject: Replace BitUtils with C++20: RotateLeft/RotateRight Now that we've flipped the C++20 switch, let's start making use of the nice new header. I'm planning on handling this move away from BitUtils.h incrementally in a series of PRs. There may be a few functions remaining in BitUtils.h by the end that C++20 doesn't have any equivalents for. --- Source/Core/Common/Crypto/AES.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/Common/Crypto/AES.cpp') diff --git a/Source/Core/Common/Crypto/AES.cpp b/Source/Core/Common/Crypto/AES.cpp index 82f7d1a9c2..3fc9a80a56 100644 --- a/Source/Core/Common/Crypto/AES.cpp +++ b/Source/Core/Common/Crypto/AES.cpp @@ -2,12 +2,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include +#include #include #include #include "Common/Assert.h" -#include "Common/BitUtils.h" #include "Common/CPUDetect.h" #include "Common/Crypto/AES.h" @@ -294,7 +294,7 @@ public: { const uint8x16_t enc = vaeseq_u8(vreinterpretq_u8_u32(vmovq_n_u32(rk[i + 3])), vmovq_n_u8(0)); const u32 temp = vgetq_lane_u32(vreinterpretq_u32_u8(enc), 0); - rk[i + 4] = rk[i + 0] ^ Common::RotateRight(temp, 8) ^ rcon[i / Nk]; + rk[i + 4] = rk[i + 0] ^ std::rotr(temp, 8) ^ rcon[i / Nk]; rk[i + 5] = rk[i + 4] ^ rk[i + 1]; rk[i + 6] = rk[i + 5] ^ rk[i + 2]; rk[i + 7] = rk[i + 6] ^ rk[i + 3]; -- cgit v1.2.3