Hi,
We are seeing performance bottlenecks with the TOTP library secrets generation. We are using single instance of DefaultSecretGenerator for generating the secrets in the application
The implementation of DefaultSecretGenerator is using SecureRandom for generating the strong cryptographic random number. Even though the SecureRandom ensures threadsafe, it can potentially induce bottlenecks/latency on large loads
Is the recommendation to use new instance of DefaultSecretGenerator for every request or maintain a pool of DefaultSecretGenerator? Or is this the above theory incorrect?
Hi,
We are seeing performance bottlenecks with the TOTP library secrets generation. We are using single instance of
DefaultSecretGeneratorfor generating the secrets in the applicationThe implementation of
DefaultSecretGeneratoris usingSecureRandomfor generating the strong cryptographic random number. Even though theSecureRandomensures threadsafe, it can potentially induce bottlenecks/latency on large loadsIs the recommendation to use new instance of
DefaultSecretGeneratorfor every request or maintain a pool ofDefaultSecretGenerator? Or is this the above theory incorrect?