I suggest revising the approach to handling an empty input and accepting it rather than returning an error.
Please compare with the Test Vectors in the RFC 4648 for The Base16, Base32, and Base64 Data Encodings:
https://www.rfc-editor.org/rfc/rfc4648#section-10
I suggest revising the approach to handling an empty input and accepting it rather than returning an error.
Please compare with the Test Vectors in the RFC 4648 for The Base16, Base32, and Base64 Data Encodings:
https://www.rfc-editor.org/rfc/rfc4648#section-10