mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-07 23:55:35 +00:00
967603abcc
Harden the current checks in place, I doubt these will ever hit (you can prove easily by reading the current source code this cannot happen) but just in case a new Go version does something weird or something else goes catastrophicly wrong, this should add an extra defense-in-depth layer. `n != aeadKeySize` will panic a nil error, don't think it's needed to add more logic to this, a nil error is enough to indicate that that condition failed (given the other condition is `err != nil`). Also move constant integers to being `const`, this helps reducing the amount of instructions being done for the extra check. |
||
---|---|---|
.. | ||
keying.go | ||
keying_test.go |