Skip to content

Replace strings.TrimRight with base32.NoPadding #38

@ghost

Description

In totp.Generate() there is
v.Set("secret", strings.TrimRight(base32.StdEncoding.EncodeToString(secret), "="))
to remove the "=" used for padding. Instead of trimming the result, the following should be used:
base32.StdEncoding.WithPadding(base32.NoPadding).EncodeToString(secret))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions