Make padding skip clear in Base64URL encoding (#5176)

This commit is contained in:
Ernesto García
2024-09-03 11:37:09 -06:00
committed by GitHub
parent 9e970eb9fa
commit dfb3ec36b5

View File

@ -23,6 +23,7 @@ library Base64 {
/** /**
* @dev Converts a `bytes` to its Bytes64Url `string` representation. * @dev Converts a `bytes` to its Bytes64Url `string` representation.
* Output is not padded with `=` as specified in https://www.rfc-editor.org/rfc/rfc4648[rfc4648].
*/ */
function encodeURL(bytes memory data) internal pure returns (string memory) { function encodeURL(bytes memory data) internal pure returns (string memory) {
return _encode(data, _TABLE_URL, false); return _encode(data, _TABLE_URL, false);