mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
AK: Add Endian.h header to replace NetworkOrdered.h.
This commit is contained in:
parent
ecf6cbbd02
commit
10c6f062b3
20 changed files with 195 additions and 106 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Endian.h>
|
||||
#include <AK/Types.h>
|
||||
#include <LibCrypto/Hash/SHA1.h>
|
||||
|
||||
|
@ -39,7 +40,7 @@ inline void SHA1::transform(const u8* data)
|
|||
{
|
||||
u32 blocks[80];
|
||||
for (size_t i = 0; i < 16; ++i)
|
||||
blocks[i] = convert_between_host_and_network(((const u32*)data)[i]);
|
||||
blocks[i] = AK::convert_between_host_and_network_endian(((const u32*)data)[i]);
|
||||
|
||||
// w[i] = (w[i-3] xor w[i-8] xor w[i-14] xor w[i-16]) leftrotate 1
|
||||
for (size_t i = 16; i < Rounds; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue