-
Notifications
You must be signed in to change notification settings - Fork 7
/
example-l.html
33 lines (28 loc) · 1.14 KB
/
example-l.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<html>
<head>
<script type="text/javascript" src="./local/2.0.0-crypto-sha1.js"></script>
<script type="text/javascript" src="./local/2.0.0-hmac-min.js"></script>
<script type="text/javascript" src="./hotp/hotp.js"></script>
<title>HOTP Sample Test Page in Javascript</title>
</head>
<body>
<h1>HOTP Sample Test Page in Javascript</h1>
<script>
//document.write(hotp("505FAB31EDDE28AAC73F3531771758A2C5CF9730","4008","hex40"));
//document.write(" ");
//document.write(hotp("505FAB31EDDE28AAC73F3531771758A2C5CF9730","4008","dec6"));
document.write("test vector from RFC 4226 for token key : 0x3132333435363738393031323334353637383930<br/>");
for (var i=0; i<10; i++) {
document.write("count: "+i);
document.write(" hex40 (used in ootp): ");
document.write(hotp("3132333435363738393031323334353637383930",i,"hex40"));
document.write(" HOTP value: ");
document.write(hotp("3132333435363738393031323334353637383930",i,"dec6"));
document.write("<br />");
}
</script>
<br />
<br />
<a href="http://www.gitorious.org/hotp-js">demo of hotp-js - source code available at http://www.gitorious.org/hotp-js</a>
</body>
</html>