From 7de2b42d50e3c05cc143e7b51284009b5e185581 Mon Sep 17 00:00:00 2001 From: forsyth Date: Tue, 10 Aug 2010 23:06:28 +0100 Subject: 20100810-2306 --- appl/cmd/randpass.b | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'appl/cmd/randpass.b') diff --git a/appl/cmd/randpass.b b/appl/cmd/randpass.b index 074b21ac..ddfa8e09 100644 --- a/appl/cmd/randpass.b +++ b/appl/cmd/randpass.b @@ -6,9 +6,9 @@ include "sys.m"; include "draw.m"; -include "keyring.m"; - kr : Keyring; - IPint: import kr; +include "ipints.m"; + ipints: IPints; + IPint: import ipints; Randpass: module { @@ -18,7 +18,7 @@ Randpass: module init(nil: ref Draw->Context, args: list of string) { sys = load Sys Sys->PATH; - kr = load Keyring Keyring->PATH; + ipints = load IPints IPints->PATH; if(args != nil) args = tl args; @@ -29,11 +29,7 @@ init(nil: ref Draw->Context, args: list of string) raise "fail:usage"; } } - - rbig := IPint.random(pwlen*8, pwlen*16); - rstr := rbig.iptob64(); - - sys->print("%s\n", rstr[0:pwlen]); + sys->print("%s\n", IPint.random(pwlen*8).iptob64()[0: pwlen]); } isnumeric(s: string): int -- cgit v1.2.3