Skip to content

Instantly share code, notes, and snippets.

View jinhaichen's full-sized avatar
🏠
Working from home

Jinhai Chen jinhaichen

🏠
Working from home
View GitHub Profile
// https://people.csail.mit.edu/rivest/Rivest-rc5rev.pdf
#include <stdint.h>
#include <string.h>
#include <math.h>
uint32_t shift_left(uint32_t v, uint32_t n) {
return v << n;
// return v * pow(2, n);
}