aboutsummaryrefslogtreecommitdiff
path: root/src/crypto.c
diff options
context:
space:
mode:
authorame <[email protected]>2024-04-15 08:23:28 -0500
committerame <[email protected]>2024-04-15 08:23:28 -0500
commit89c9c2e56c8b547ee0b0e104798c609d8d307f5e (patch)
treee864d5bb71d06320ede5a5f15158938dcc4c1912 /src/crypto.c
parent7018bae05d9c04c799e715294b5c58317f21a5ac (diff)
msys2 + fix logging
Diffstat (limited to 'src/crypto.c')
-rw-r--r--src/crypto.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/crypto.c b/src/crypto.c
index 8bb896a..7556b6f 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -1,25 +1,25 @@
-#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));
-}
-
-unsigned rotr32(unsigned x, unsigned n) {
- return (x >> n % 32) | (x << (32-n) % 32);
-}
-
-uint64_t rotl64(uint64_t y, uint64_t offset){
- return ( y << offset ) | ( y >> (64 - offset));
-}
-
-uint64_t rotr64(uint64_t x, uint64_t n) {
- return (x >> n) | (x << (64-n));
-}
+#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));
+}
+
+unsigned rotr32(unsigned x, unsigned n) {
+ return (x >> n % 32) | (x << (32-n) % 32);
+}
+
+uint64_t rotl64(uint64_t y, uint64_t offset){
+ return ( y << offset ) | ( y >> (64 - offset));
+}
+
+uint64_t rotr64(uint64_t x, uint64_t n) {
+ return (x >> n) | (x << (64-n));
+}