]> git.cryptolib.org Git - avr-crypto-lib.git/commitdiff
schon wieder was falsch gemacht ...
authorbg <bg@b1d182e4-1ff8-0310-901f-bddb46175740>
Thu, 20 Dec 2007 02:18:24 +0000 (02:18 +0000)
committerbg <bg@b1d182e4-1ff8-0310-901f-bddb46175740>
Thu, 20 Dec 2007 02:18:24 +0000 (02:18 +0000)
hmac-sha256.c

index 714933f8cda7a4ea48b59e9f42f57d37f65ed842..f7cf7bab1eff62635627f24ef2fb6f0c8069904b 100644 (file)
@@ -29,7 +29,7 @@ void hmac_sha256_init(hmac_sha256_ctx_t *s, void* key, uint16_t kl){
        if (kl > SHA256_BLOCK_BITS){
                sha256((void*)buffer, key, kl);
        } else {
-               memcpy(buffer, key, (kl+7/8));
+               memcpy(buffer, key, (kl+7)/8);
        }
        
        for (i=0; i<SHA256_BLOCK_BITS/8; ++i){