Skip to content

Conversation

@egrim
Copy link
Member

@egrim egrim commented May 31, 2013

No description provided.

Copy link
Member

Choose a reason for hiding this comment

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

What does this do? I see a lot of bit manipulation.

Copy link
Member

Choose a reason for hiding this comment

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

Best explanation is http://en.wikipedia.org/wiki/HMAC-based_One-time_Password_Algorithm. Truncate is:

a function that selects 4 bytes from the result of the HMAC in a defined manner

This implementation is just a php port of the truncate algorithm from the oath reference implementation

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.

4 participants