diff --git a/blake2b.cpp b/blake2b.cpp index 6c4998d..445a498 100644 --- a/blake2b.cpp +++ b/blake2b.cpp @@ -343,7 +343,17 @@ void blake2b_nativeIn(void *out, size_t outSize, const uint64_t *in, size_t inSi */ void blake2b_nativeInOut(uint64_t out[8], const uint64_t *in, size_t inSize) { - blake2b_native(out, 0x01010040, in, inSize); + uint64_t hash[8]; + + blake2b_native(hash, 0x01010040, in, inSize); + + for (size_t i = 0; i < 8; i++) + { + out[i] hash[i]; + } + + // Clear + secureClearMemory(hash, sizeof(hash)); } #endif