3 ms·
> prevent HashDoS attacks[1] at the expense of slower hashing. I actually don't know whether Go's hashmap does the same. From looking at the code[1], it seems
by komuW 6y ago
> prevent HashDoS attacks[1] at the expense of slower hashing. I actually don't know whether Go's hashmap does the same.
From looking at the code[1], it seems like it does. From[2] it looks like it is only for platforms that have AES.
1. https://github.com/golang/go/blob/7bfe32f39c59056c49f5776b104beaf09b010088/src/runtime/map.go#L1001-L1003 https://github.com/golang/go/blob/7bfe32f39c59056c49f5776b10...
2. https://github.com/golang/go/issues/9365 https://github.com/golang/go/issues/9365