(b *testing.B)
| 134 | } |
| 135 | |
| 136 | func BenchmarkString20(b *testing.B) { |
| 137 | b.SetBytes(20) |
| 138 | b.ReportAllocs() |
| 139 | for i := 0; i < b.N; i++ { |
| 140 | _, _ = cryptorand.String(20) |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | func BenchmarkStringUnsafe20(b *testing.B) { |
| 145 | mkstring := func(charSetStr string, size int) (string, error) { |