[racket] Example of using OpenSSL instead of mzcrypto

From: Galler (lzgaller at optonline.net)
Date: Tue Apr 24 13:14:37 EDT 2012


Neil V. mentioned his preference for directly calling the OpenSSL 
libraries vs. using  mzcrypto (planet vyzo/crypto)

I wanted to provide a small example using this technique for 
generating and retrieving a 1024 bit unencrypted private key in
PEM format.

(define res (process "openssl genrsa 1024"))

(port->string (first res))

;;returns 
"-----BEGIN RSA PRIVATE KEY-----
......[the key].....
-----END RSA PRIVATE KEY-----\n"




Posted on the users mailing list.