projects
/
rust-lightning
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add a ChannelUnavailable error
[rust-lightning]
/
src
/
util
/
rust_crypto_nonstd_arch.c
1
#include <stdint.h>
2
#include <stdlib.h>
3
4
uint32_t rust_crypto_util_fixed_time_eq_asm(uint8_t* lhsp, uint8_t* rhsp, size_t count) {
5
if (count == 0) {
6
return 1;
7
}
8
uint8_t result = 0;
9
for (size_t i = 0; i < count; i++) {
10
result |= (lhsp[i] ^ rhsp[i]);
11
}
12
return result;
13
}