We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb71ca2 commit ff8622cCopy full SHA for ff8622c
authcrypt/main.cpp
@@ -46,8 +46,11 @@ static const char metadata[] = "eg sequence number, routing info";
46
47
class Authcrypt {
48
public:
49
- Authcrypt() : ciphertext(), decrypted()
+ Authcrypt()
50
{
51
+ memset(ciphertext, 0, sizeof(ciphertext));
52
+ memset(decrypted, 0, sizeof(decrypted));
53
+
54
mbedtls_entropy_init(&entropy);
55
mbedtls_ctr_drbg_init(&drbg);
56
mbedtls_cipher_init(&cipher);
@@ -58,9 +61,9 @@ class Authcrypt {
58
61
memset(ciphertext, 0, sizeof(ciphertext));
59
62
memset(decrypted, 0, sizeof(decrypted));
60
63
- mbedtls_entropy_free(&entropy);
- mbedtls_ctr_drbg_free(&drbg);
64
mbedtls_cipher_free(&cipher);
65
+ mbedtls_ctr_drbg_free(&drbg);
66
+ mbedtls_entropy_free(&entropy);
67
}
68
69
int run()
0 commit comments