package otp
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Otp.CoreSource
This module is the core of the library and its functions are not exposed except for testing purpose. Do note rely on it for production.
Computes the hashed message authentication code given a secret (string) and a counter, according to RFC 2104. Validated with RFC 2202 tests vectors.
Computes the dynamic truncation function mentioned in RFC4226. The function has been tested with the example given in section 5.4.
Computes the HMAC from the number of digits, the shared secret and the counter. This is a combination of the hmac_sha1 followed by dynamic_truncation functions.
Helper function to display a date from a Unix time value (provided by e.g. Unix.time)