version 1.11, 1999/03/06 20:19:20 |
version 1.12, 1999/03/06 20:27:41 |
|
|
{ |
{ |
int n, i, cnt = 1, pass = 0, hexmode = 0; |
int n, i, cnt = 1, pass = 0, hexmode = 0; |
char passwd[SKEY_MAX_PW_LEN+1], key[SKEY_BINKEY_SIZE]; |
char passwd[SKEY_MAX_PW_LEN+1], key[SKEY_BINKEY_SIZE]; |
char bufs[33], bufh[33], *seed, *slash; |
char buf[33], *seed, *slash; |
|
|
/* If we were called as otp-METHOD, set algorithm based on that */ |
/* If we were called as otp-METHOD, set algorithm based on that */ |
if ((slash = strrchr(argv[0], '/'))) |
if ((slash = strrchr(argv[0], '/'))) |
|
|
if (cnt == 1) { |
if (cnt == 1) { |
while (n-- != 0) |
while (n-- != 0) |
f(key); |
f(key); |
(void)puts(hexmode ? put8(bufh, key) : btoe(bufs, key)); |
(void)puts(hexmode ? put8(buf, key) : btoe(buf, key)); |
} else { |
} else { |
for (i = 0; i <= n - cnt; i++) |
for (i = 0; i <= n - cnt; i++) |
f(key); |
f(key); |
for (; i <= n; i++) { |
for (; i <= n; i++) { |
if (hexmode) |
if (hexmode) |
(void)printf("%d: %-29s %s\n", i, |
(void)printf("%d: %-29s %s\n", i, |
btoe(bufs, key), put8(bufh, key)); |
btoe(buf, key), put8(buf, key)); |
else |
else |
(void)printf("%d: %-29s\n", i, btoe(bufs, key)); |
(void)printf("%d: %-29s\n", i, btoe(buf, key)); |
f(key); |
f(key); |
} |
} |
} |
} |