Skip to content

base32_encode returns an error when the leading byte is 0 #54

@TetraK1

Description

@TetraK1

base32_encode passes the byte array to check_input, which returns an error if the first byte is 0.

This fails when it shouldn't i.e. 0 is a valid secret.

uint8_t secret_bytes[] = {0, 0, 0, 0};
cotp_error_t err_code;
base32_encode(secret_bytes, 4, &err_code);
// err_code = EMPTY_STRING

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions