Compat lua compile as cpp (#1568)

* Compat lua compile as cpp

* Compat lua compile as cpp
This commit is contained in:
Bruce
2022-04-07 17:22:32 +08:00
committed by GitHub
parent 2660b10442
commit 9fd7a51b34
6 changed files with 68 additions and 58 deletions

View File

@@ -263,11 +263,11 @@ lsha1(lua_State *L) {
#define BLOCKSIZE 64
static inline void
xor_key(uint8_t key[BLOCKSIZE], uint32_t xor) {
xor_key(uint8_t key[BLOCKSIZE], uint32_t xor_) {
int i;
for (i=0;i<BLOCKSIZE;i+=sizeof(uint32_t)) {
uint32_t * k = (uint32_t *)&key[i];
*k ^= xor;
*k ^= xor_;
}
}