{"size": 2691, "ext": "scrbl", "max_stars_repo_path": "doc/utils/rfc/otp.scrbl", "max_stars_repo_name": "christoff-buerger/sagittarius-scheme", "max_stars_repo_stars_event_min_datetime": "2015-11-07T07:13:35.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-15T03:35:14.000Z", "max_issues_repo_path": "doc/utils/rfc/otp.scrbl", "max_issues_repo_name": "christoff-buerger/sagittarius-scheme", "max_issues_repo_issues_event_min_datetime": "2016-04-28T21:59:59.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-01T08:42:21.000Z", "max_forks_repo_path": "doc/utils/rfc/otp.scrbl", "max_forks_repo_name": "christoff-buerger/sagittarius-scheme", "max_forks_repo_forks_event_min_datetime": "2016-12-28T12:41:23.000Z", "max_forks_repo_forks_event_max_datetime": "2020-02-26T20:52:02.000Z"}
{"max_stars_count": 39, "max_issues_count": 3, "max_forks_count": 4, "avg_line_length": 36.3648648649, "max_line_length": 80, "alphanum_fraction": 0.7562244519}
@; -*- coding: utf-8 -*-
@subsection[:tag "rfc.hotp"]{(rfc hotp) - HMAC-based One-Time Password library}

@define[Library]{@name{(rfc hotp)}}
@desc{
Provides HMAC-based One-Time Password (HOTP) generating procedures. HOTP is
defined in RFC 4226:
@hyperlink[:href "http://tools.ietf.org/html/rfc4226"]{RFC 4226}.
}

@define[Function]{@name{generate-hmac-based-one-time-password} @args{K C digit}}
@define[Function]{@name{hotp} @args{K C digit}}
@desc{
@var{K} must be a bytevector represents shared secret.

@var{C} must be an exact integer represents counter.

@var{digit} must be an exact integer.

Generates an HMAC-based one-time password.

@code{hotp} is an alias of @code{generate-hmac-based-one-time-password}.
}


@subsection[:tag "rfc.totp"]{(rfc totp) - Time-based One-Time Password library}

@define[Library]{@name{(rfc totp)}}
@desc{
Provides Time-based One-Time Password (TOTP) generating procedures. TOTP is
defined in RFC 6238:
@hyperlink[:href "http://tools.ietf.org/html/rfc6238"]{RFC 6238}.
}

@define[Function]{@name{generate-time-based-one-time-password}
  @args{K digit :key time start-time step mode}}
@define[Function]{@name{totp}
  @args{K digit :key time start-time step mode}}
@desc{
@var{K} must be a bytevector represents shared secret.

@var{digit} must be a positive exact integer.

The keyword argument @var{time} is given, then it must be a UTC time object
of SRFI-19. The procedure computes returning one-time password according to
the given time. The default value is @code{(current-time)}.

NOTE: @var{time} keyword should not be specified unless its testing purpose.

The keyword arguments described below are system parameters, means these
parameters must be agreed between authenticator.

The keyword argument @var{start-time} is given, then it must be a UTC time
object of SRFI-19. The procedure computes returning one-time password according
to the given time. The defaule value is @code{(make-time time-utc 0 0)}.

The keyword argument @var{step} is given, then it must be a positive exact
integer. The procedure computes returning one-time password according
to the given time. The defaule value is @code{30}.

The keyword argument @var{step} is given, then it must be a positive exact
integer. The procedure computes returning one-time password according
to the given time. The defaule value is @code{30}.

The keyword argument @var{mode} is given, then it must be a hash algorithm name
either builtin or custom. The procedure computes returning one-time password
according to the given time. The defaule value is @code{SHA-1}.


Generates an Time-based one-time password.

@code{totp} is an alias of @code{generate-time-based-one-time-password}.
}
