UNPKG
@me7/totp
Version:
latest (1.3.0)
1.3.0
1.2.0
1.1.0
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Time-Based One-Time Password Algorithm (RFC 6238)
github.com/me7/totp
me7/totp
@me7/totp
/
src
/
index.ts
16 lines
(12 loc)
•
236 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import
{ name }
from
"./crypto"
;
export
function
hi
(
name
:
string
):
string
{
return
`hello my name is
${name}
`
; }
export
class
TOTP
{
static
generate
():
number
{
return
Math
.
random
(); }
validate
(
) {
return
name; } }