mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Many still import (chibi), and as (scheme base) is somewhat more expensive to load at present these are changed to cond-expand. Many libraries also rely on (srfi 33), and these have been changed to a cond-expand first trying (srfi 60) where available. Also fixing a few portability concerns (duplicate imports of the same binding), and adding a few libraries missing from lib-tests.scm.
12 lines
463 B
Scheme
12 lines
463 B
Scheme
|
|
(define-library (chibi crypto rsa)
|
|
(import (scheme base) (srfi 27)
|
|
(chibi bytevector) (chibi math prime))
|
|
(cond-expand
|
|
((library (srfi 60)) (import (srfi 60)))
|
|
(else (import (srfi 33))))
|
|
(export make-rsa-key rsa-key-gen rsa-key-gen-from-primes rsa-pub-key
|
|
rsa-encrypt rsa-decrypt rsa-sign rsa-verify rsa-verify?
|
|
rsa-key? rsa-key-bits rsa-key-n rsa-key-e rsa-key-d
|
|
pkcs1-pad pkcs1-unpad)
|
|
(include "rsa.scm"))
|