aboutsummaryrefslogtreecommitdiff
path: root/src/crypto.c
diff options
context:
space:
mode:
authorame <[email protected]>2023-11-17 10:10:47 -0600
committerame <[email protected]>2023-11-17 10:10:47 -0600
commitb224d2f0b9b344a08c6c508d61f15bdf205464f8 (patch)
tree4b265eb0e9f7b1666be24cac3b9d27a6b343fbb4 /src/crypto.c
parent4fc59207afdf442cd769992339b7fdea0ff2a2b8 (diff)
tons of hashes bleh
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 bddb2e6..b99add7 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -7,3 +7,11 @@ unsigned i_lr(unsigned y, unsigned offset){
unsigned i_rr(unsigned x, unsigned n) {
return (x >> n % 32) | (x << (32-n) % 32);
}
+
+uint64_t i_lr64(uint64_t y, uint64_t offset){
+ return ( y << offset ) | ( y >> (64 - offset));
+}
+
+uint64_t i_rr64(uint64_t x, uint64_t n) {
+ return (x >> n) | (x << (64-n));
+}