More tests to show key changes
Demonstrating that a new key is chosen on every close operation.
This commit is contained in:
parent
d8208fbab5
commit
52dee3bad0
2
vault.c
2
vault.c
@ -264,6 +264,7 @@ int main(void) {
|
|||||||
*/
|
*/
|
||||||
struct vault_t *vault = vault_init(64, 0.1);
|
struct vault_t *vault = vault_init(64, 0.1);
|
||||||
dump(vault->data, vault->data_length);
|
dump(vault->data, vault->data_length);
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
if (!vault_close(vault)) {
|
if (!vault_close(vault)) {
|
||||||
fprintf(stderr, "vault close failed.\n");
|
fprintf(stderr, "vault close failed.\n");
|
||||||
abort();
|
abort();
|
||||||
@ -274,6 +275,7 @@ int main(void) {
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
dump(vault->data, vault->data_length);
|
dump(vault->data, vault->data_length);
|
||||||
|
}
|
||||||
vault_free(vault);
|
vault_free(vault);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user