aboutsummaryrefslogtreecommitdiff
path: root/src/crypto.c
diff options
context:
space:
mode:
authorame <[email protected]>2024-03-27 13:34:34 -0500
committerame <[email protected]>2024-03-27 13:34:34 -0500
commita735c538144f8cc4e059d47d06093a17edd5b31c (patch)
tree11db0e99732c9851c4a2c94f3e318da1cdec7716 /src/crypto.c
parent28a9d801572cf69d20d1f0a12c383ca7dbae3a67 (diff)
fixed a few hashes
Diffstat (limited to 'src/crypto.c')
-rw-r--r--src/crypto.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/crypto.c b/src/crypto.c
index 8070eee..4985e0d 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -1,5 +1,13 @@
#include "crypto.h"
+uint8_t rotl8(uint8_t y, uint8_t offset){
+ return ( y << offset ) | ( y >> (8 - offset));
+}
+
+uint16_t rotl16(uint16_t y, uint16_t offset){
+ return ( y << offset ) | ( y >> (16 - offset));
+}
+
unsigned rotl32(unsigned y, unsigned offset){
return ( y << offset ) | ( y >> (32 - offset));
}