July 2017
Beginner to intermediate
358 pages
10h 54m
English
The following table illustrates the approximate time it takes to generate and compare a hashed string using the methods we have discussed so far. Even with 1,000 peppers, we would be looking at a processing time of approximately 1.5 ms to run the comparison. This might not seem a huge amount of time; however, we need to take these benchmarks with a pinch of salt as they are running a single operation where your server will be dealing with multiple requests concurrently. What we do know is that comparing a hash with a list of 1,000 peppers takes 10x longer than comparing a list of 100, and this is 10x longer than a list of 10:
BenchmarkGeneratePlainHash-8 30000000 1069 ns/opBenchmarkGenerateHashWithSaltAndPepper-8 5000000 5223 ns/op ...
Read now
Unlock full access