mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
BLAKE2s hash function
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
// CPU is assumed to be little endian. Edit this file if you
|
||||
// need to port this library to a big endian CPU.
|
||||
|
||||
#define CRYPTO_LITTLE_ENDIAN 1
|
||||
|
||||
#define htole32(x) (x)
|
||||
#define le32toh(x) (x)
|
||||
#define htobe32(x) \
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
// Left rotate by 11: Rotate left by 8, then left by 3.
|
||||
#define leftRotate11(a) (leftRotate(leftRotate(leftRotate(leftRotate((a), 8), 1), 1), 1))
|
||||
|
||||
// Left rotate by 12: Rotate left by 8, then left by 4.
|
||||
#define leftRotate12(a) (leftRotate(leftRotate(leftRotate(leftRotate(leftRotate((a), 8), 1), 1), 1), 1))
|
||||
// Left rotate by 12: Rotate left by 16, then right by 4.
|
||||
#define leftRotate12(a) (rightRotate(rightRotate(rightRotate(rightRotate(leftRotate((a), 16), 1), 1), 1), 1))
|
||||
|
||||
// Left rotate by 13: Rotate left by 16, then right by 3.
|
||||
#define leftRotate13(a) (rightRotate(rightRotate(rightRotate(leftRotate((a), 16), 1), 1), 1))
|
||||
|
||||
Reference in New Issue
Block a user