summaryrefslogtreecommitdiff
path: root/appl/cmd/auth/aescbc.b
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2007-07-14 10:41:18 +0000
committerCharles.Forsyth <devnull@localhost>2007-07-14 10:41:18 +0000
commita6011949be081a8fe1bec0713ce60c36beb3a351 (patch)
tree0855fa75f38a7361a9b7a9fe12608bd99761add0 /appl/cmd/auth/aescbc.b
parentd42218ac2785e9e4bea53ec499f563cab5747959 (diff)
20070714-1142
Diffstat (limited to 'appl/cmd/auth/aescbc.b')
-rw-r--r--appl/cmd/auth/aescbc.b16
1 files changed, 1 insertions, 15 deletions
diff --git a/appl/cmd/auth/aescbc.b b/appl/cmd/auth/aescbc.b
index c5b6e301..e168cd47 100644
--- a/appl/cmd/auth/aescbc.b
+++ b/appl/cmd/auth/aescbc.b
@@ -81,7 +81,7 @@ init(nil: ref Draw->Context, args: list of string)
fd := sys->open(keyfile, Sys->OREAD);
if(fd == nil)
error(sys->sprint("can't open %q: %r", keyfile), "keyfile");
- n := readn(fd, buf, len buf);
+ n := sys->readn(fd, buf, len buf);
while(n > 0 && buf[n-1] == byte '\n')
n--;
if(n <= 0)
@@ -175,20 +175,6 @@ eqbytes(a: array of byte, b: array of byte, n: int): int
return 1;
}
-readn(fd: ref Sys->FD, buf: array of byte, nb: int): int
-{
- for(nr := 0; nr < nb;){
- n := sys->read(fd, buf[nr:], nb-nr);
- if(n <= 0){
- if(nr == 0)
- return n;
- break;
- }
- nr += n;
- }
- return nr;
-}
-
Read(buf: array of byte, n: int)
{
if(bin.read(buf, n) != n){