[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: Cryptokit port to Numerix



On Tue, Dec 16, 2003 at 10:09:27AM +0100, Sven Luther wrote:
> On Mon, Dec 15, 2003 at 01:30:01PM -0800, Michael K. Edwards wrote:
> > Sven -
> > 
> > Fabio suggested that I contact you for help with packaging the Numerix and 
> > Cryptokit OCaml libraries.  (He and Peter are packaging the SKS OpenPGP 

If you package cryptokit, please apply the following patch.  Without
this patch, but buffering code in the kit won't output the last buffer.
This makes it impossible to use for streaming protocols, where the data
is always sent in multiples of the blocksize.  It doesn't affect any
other use of the library.

--- orig/cryptokit.ml
+++ mod/cryptokit.ml
@@ -512,7 +512,7 @@
 
     method put_substring src ofs len =
       if len <= 0 then () else
-      if used + len <= blocksize then begin
+      if used + len < blocksize then begin
         (* Just accumulate len characters in ibuf *)
         String.blit src ofs ibuf used len;
         used <- used + len



Reply to: