// How long does one vault unlock take (Argon2id, 3 passes, 256 MiB, as README section 5)? The backend runs it inside the UI-backend slot. #include #include #include int main(void) { sodium_init(); unsigned char salt[crypto_pwhash_SALTBYTES] = {0}, key[32]; struct timespec a, b; clock_gettime(CLOCK_MONOTONIC, &a); int r = crypto_pwhash(key, sizeof key, "review-test-pass", 16, salt, 3, 256u << 20, crypto_pwhash_ALG_ARGON2ID13); clock_gettime(CLOCK_MONOTONIC, &b); printf("argon2id (3 passes, 256 MiB): rc=%d, %.0f ms\n", r, (b.tv_sec - a.tv_sec) * 1e3 + (b.tv_nsec - a.tv_nsec) / 1e6); }