aboutsummaryrefslogtreecommitdiff
path: root/src/crypto.c
diff options
context:
space:
mode:
authorame <[email protected]>2023-10-24 23:51:50 -0500
committerame <[email protected]>2023-10-24 23:51:50 -0500
commit27c33caa85a3f61686ceae7bf555817d69df9c84 (patch)
tree185cdaabc7923dc8444e4afee185f94a1e19c160 /src/crypto.c
parentc177b7a0ec55307e4f1352ca8b68c3e059c2add6 (diff)
sha2xx
Diffstat (limited to 'src/crypto.c')
-rw-r--r--src/crypto.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/crypto.c b/src/crypto.c
index 7362ac2..bddb2e6 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -3,3 +3,7 @@
unsigned i_lr(unsigned y, unsigned offset){
return ( y << offset ) | ( y >> (32 - offset));
}
+
+unsigned i_rr(unsigned x, unsigned n) {
+ return (x >> n % 32) | (x << (32-n) % 32);
+}