Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak base32 implementation #131

Merged
merged 5 commits into from Apr 25, 2020
Merged

Tweak base32 implementation #131

merged 5 commits into from Apr 25, 2020

Conversation

robinvanpoppel
Copy link
Collaborator

  • Tracked down original implementation of Base32.cs.
    • Applied their license
    • Applied our project formatting.
    • Fixed a violation of the RFC with empty strings
  • Tweak ExtIsBase32, so that trailing = (padding) is allowed

When done, should close #130

- Tracked down original implementation of Base32.cs.
  * Applied their license
  * Applied our project formatting.
  * Fixed a violation of the RFC with empty strings
- Tweak ExtIsBase32, so that trailing = (padding) is allowed
@robinvanpoppel robinvanpoppel changed the title - Added tests for the base32 implementation. Tweak base32 implementation Apr 24, 2020
var actual = InvalidSeed.IsBase32(out string invalidChars);

actual.Should().BeFalse();
invalidChars.Should().Be("!======!");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this should then only return !! as invalidChars, shouldn't it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would depend on the outcome above. I think it could say just '!', or '!!', but in this example the = is not used as padding and is invalid as well...

@sonarcloud
Copy link

sonarcloud bot commented Apr 25, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 1 Vulnerability (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 46 Code Smells

47.1% 47.1% Coverage
0.4% 0.4% Duplication

@robinvanpoppel robinvanpoppel merged commit 4057297 into master Apr 25, 2020
@robinvanpoppel robinvanpoppel deleted the base32 branch April 25, 2020 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when TOTP is padded with = characters
2 participants