Skip to content

Tags: creachadair/otp

Tags

v0.5.4

Toggle v0.5.4's commit message
Release v0.5.3

Maintenance update, no functional changes.

- go.mod: update module dependencies
- otpauth: use strings.SplitSeq where appropriate
- go.mod: update staticcheck to v0.7.0

v0.5.3

Toggle v0.5.3's commit message
Release v0.5.3

Maintenance update, no functional changes.

Dependencies:

- .github: update actions/checkout to v6
- go.mod: update module dependencies
- .github: update CI setup-go to v6

Documentation & Testing:

- otpauth: mirror the key URI documentation
- otp: add some additional formatting test cases

v0.5.2

Toggle v0.5.2's commit message
otp: replace the ParseKey method of Config

Instead of mutating the underlying Config, return a modified copy.
For compatibility, retain the existing method, but deprecate it.
Update the tests and examples.

Before:

    cfg := otp.Config{/* ... */}
    if err := otp.ParseKey("..."); err != nil {
       // ...

After:

    cfg, err := otp.Config{/* ... */}.WithKey("...")
    if err != nil {
       // ...

v0.5.1

Toggle v0.5.1's commit message
Release v0.5.1

Maintenance release, no functional changes.

- go.mod: update module dependencies
- README.md: add CI link
- Update doc comments

v0.5.0

Toggle v0.5.0's commit message
Release v0.5.0

Maintenance:
- go.mod: update module dependencies
- otpauth: fix comment typos
- otpauth: clean up doc comments a bit

Additions:
- otpauth: add support for parsing "otpauth-migration" URLs

Docs:
- docs: add a clone of the OTP URI spec

v0.4.2

Toggle v0.4.2's commit message
Release v0.4.2

Maintenance release, no functional changes.
Update tests, dependencies, and documentation.

- otpauth: use cmp.Diff for test result comparison
- otpauth: add additional test cases
- go.mod: update module dependencies
- otp_test: add RFC 6238 SHA256 and SHA512 test vectors (#3)

v0.4.1

Toggle v0.4.1's commit message
Release v0.4.1

Maintenance release.

- Update Go toolchain base.
- otpauth: use query escaping for query parameters.

v0.4.0

Toggle v0.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Change the type signature of the Format callback. (#2)

Prior to this change, a custom format function is called after truncating the
hash to 31 bits per the RFC 4226 DT algorithm.  Instead, pass the unmodified
HMAC output to the formatter, and export the truncation algorithm as a helper.

This is a breaking change to the package API, but will only affect dependents
who define a custom format function not using otp.FormatAlphabet.

An existing function of the form

    func(v uint64, nb int) string { /* ... */ }

can be adapted to this new interface by modifying it as follows:

    func(hash []byte, nb int) string {
        v := otp.Truncate(hash)
        /* ... */
    }

Also:
- Update tests and documentation.
- Add another example.

v0.3.2

Toggle v0.3.2's commit message
otpauth: add MarshalText and UnmarshalText methods to URL

v0.3.1

Toggle v0.3.1's commit message
Release v0.3.1

New features:
- Add DefaultTOTP and DefaultHOTP helper functions.

Maintenance:
- Update default CI permissions.
- Split tests into internal/external.