INNER CODE UNIT · C

init_checksum

dmitrystu/sboot_stm32 · src/checksum.c:116

static void init_checksum(checksum_t *cs) { *cs = 0; }

#endif

static int __memcmp(const void *a, const void *b, size_t len) {
    const int8_t *x = a;
    const int8_t *y = b;
    for(size_t i = 0; i < len; i++){
        int res = x[i] - y[i];
        if (res != 0) return res;
     }
    return 0;
}

const size_t checksum_length = sizeof(checksum_t);

size_t append_checksum(void *data, size_t len, size_t bsize) {
    checksum_t cs;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…