source: project/release/4/modular-crypt/trunk/implementations/MD5/gensalt.scm @ 22216

Last change on this file since 22216 was 22216, checked in by sjamaan, 9 years ago

Add initial code for crypt egg

File size: 421 bytes
Line 
1(foreign-declare "#include \"implementations/MD5/gensalt_md5.c\" ")
2
3;; TODO: support 3 bytes salt (where is that used?)
4(define (crypt-md5-gensalt random)      ; No "rounds" option; always 1000
5  (let ((output (make-string 11)))
6    ((foreign-lambda c-pointer "_crypt_gensalt_md5_rn"
7                     u8vector int scheme-pointer int)
8    (get-random-u8vector 'crypt-md5-gensalt random 6 6) 6 output 11)
9    output))
Note: See TracBrowser for help on using the repository browser.