mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
AK: Add Endian.h header to replace NetworkOrdered.h.
This commit is contained in:
parent
ecf6cbbd02
commit
10c6f062b3
Notes:
sideshowbarker
2024-07-19 03:10:52 +09:00
Author: https://github.com/asynts
Commit: 10c6f062b3
Pull-request: https://github.com/SerenityOS/serenity/pull/3294
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