Java security code in Clojure

2009-08-31 Thread Sam Hughes
Hey, I'm trying to write a Clojure security library. My first step is porting some working Java code into Clojure. The Java and Clojure snippets below are more or less the same, but with the Clojure code, I'm getting: "java.security.InvalidKeyException: IOException: null [Thrown class java.securi

Re: Java security code in Clojure

2009-08-31 Thread Sam Hughes
byte-seq stream)) , why not  use make-array here. > > > (byte-seq stream) returns list, is that the right argument for constructor > > call? > > > Did  you try this; > > > (make-array Byte/TYPE (int (. (java.io.File. "public.der") length))) > > > Rega

Re: Java security code in Clojure

2009-09-01 Thread Sam Hughes
y wrote: > > > security=> (count byte-arr) > > 115 > > tprat...@neuromancer:~$ wc public.der > >   5  11 294 public.der > > > your byte-seq does not do what the java version does :) > > > On Aug 31, 9:19 pm, Sam Hughes wrote: > > > > Hey, &