crypto: memzero_explicit - make sure to clear out sensitive data
[linux-block.git] / crypto / sha512_generic.c
index 6ed124f3ea0f064cbe3f757d09a85e9e44c7ac54..04d295a8bc08b15592040731b5f59f40b7d7014d 100644 (file)
@@ -238,7 +238,7 @@ static int sha384_final(struct shash_desc *desc, u8 *hash)
        sha512_final(desc, D);
 
        memcpy(hash, D, 48);
-       memset(D, 0, 64);
+       memzero_explicit(D, 64);
 
        return 0;
 }