paragonie / constant_time_encoding

Constant-Time Character Encoding in PHP Projects
https://paragonie.com/blog/2016/06/constant-time-encoding-boring-cryptography-rfc-4648-and-you
Other
816 stars 35 forks source link

Improve performance of the hex encoder #40

Closed TimWolla closed 2 years ago

TimWolla commented 2 years ago

Single bytes can more efficiently be accessed by directly indexing the string.

This also implicitly fixes a bug without any visible effect: encodeUpper retrieved two characters from the bytestring, but only ever used the first.

TimWolla commented 2 years ago

CI failures should (hopefully) be fixed with #42.