OneTimePassword
OneTimePassword copied to clipboard
Add support for generating Steam Guard codes
Fixes #211
Overview
- Adds a new parameter to
Generatornamed "Representation". This is an enum with two values:numericandsteamguard.- Steam Guard codes are 5 alphanumeric digits instead of base-10.
- There is only one valid configuration of parameters to obtain a valid Steam Guard token generator: 30 second TOTP, sha1, 5 digits, steamguard representation.
- To keep the interface more general, this is not enforced in the API contract (such as by adding a separate constructor
init(steamGuardSecret:)). Instead, the user of the API is expected to pass the correct parameters.
- To keep the interface more general, this is not enforced in the API contract (such as by adding a separate constructor
- Adds test for TOTP values and serialization.
- Updates interface in a hopefully backwards compatible way.
- Users are expected to figure out how to obtain their Steam Guard secret on their own.
- Companion Authenticator PR
Codecov Report
Merging #225 into develop will decrease coverage by
0.42%. The diff coverage is96.72%.
@@ Coverage Diff @@
## develop #225 +/- ##
===========================================
- Coverage 97.38% 96.95% -0.43%
===========================================
Files 6 6
Lines 420 427 +7
===========================================
+ Hits 409 414 +5
- Misses 11 13 +2
| Impacted Files | Coverage Δ | |
|---|---|---|
| Sources/Token+URL.swift | 96.96% <90.00%> (-1.45%) |
:arrow_down: |
| Sources/Generator.swift | 100.00% <100.00%> (ø) |
|
| Sources/Keychain.swift | 91.89% <0.00%> (-0.68%) |
:arrow_down: |
| Sources/Crypto.swift | 100.00% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 7af91b9...d00dd01. Read the comment docs.