aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cl/README
diff options
context:
space:
mode:
authorGuillaume LE VAILLANT <[email protected]>2018-10-12 06:49:26 +0000
committerWerner Koch <[email protected]>2018-10-12 07:02:18 +0000
commit85d7af8ff2f6afd63701079e23f31be08d58a15d (patch)
tree2fa6b355a81a61d010b79e297ea644c470acb381 /lang/cl/README
parentRegister DCO for Guillaume LE VAILLANT (diff)
downloadgpgme-85d7af8ff2f6afd63701079e23f31be08d58a15d.tar.gz
gpgme-85d7af8ff2f6afd63701079e23f31be08d58a15d.zip
cl: Several fixes
-- * Use wrapper types calling translation functions instead of TRANSLATE-{FROM,TO}-FOREIGN methods as they seem not to be called in some cases. * Use the (:STRUCT SOME-C-STRUCT) notation instead of the deprecated direct reference to SOME-C-STRUCT. * Add missing values in enums and bit fields. * Use cffi-grovel to define system types (SIZE-T, OFF-T, etc). * Wrap GPGME-DATA-T in a class (like contexts). * Use the FINALIZE function from trivial-garbage to free the C objects for contexts, keys and data automatically. * Make DATA-READ-CB and DATA-WRITE-CB run faster. * Update the README file. Signed-off-by: Guillaume LE VAILLANT <[email protected]>
Diffstat (limited to 'lang/cl/README')
-rw-r--r--lang/cl/README33
1 files changed, 25 insertions, 8 deletions
diff --git a/lang/cl/README b/lang/cl/README
index b4a3c818..7d8e87d9 100644
--- a/lang/cl/README
+++ b/lang/cl/README
@@ -3,33 +3,50 @@ Common Lisp Support for GPGME
Requirements:
-ASDF Packaging Support
-CFFI Foreign Function Interface
-gpg-error GPG Error Codes
+ASDF Packaging Support
+CFFI Foreign Function Interface
+trivial-garbage Finalizers
+gpg-error GPG Error Codes
Use with:
-> (asdf:operate 'asdf:load-op ':gpgme)
+> (asdf:load-system "gpgme")
Examples
--------
-(with-open-file (stream "/tmp/myout" :direction :output
- :if-exists :supersede :element-type '(unsigned-byte 8))
+(with-open-file (out "/tmp/myout"
+ :direction :output
+ :if-exists :supersede
+ :element-type '(unsigned-byte 8))
(with-context (ctx)
- (setf (armor-p ctx) t)
+ (setf (armorp ctx) t)
(op-export ctx "DEADBEEF" out)))
(with-context (ctx)
(with-output-to-string (out)
- (setf (armor-p ctx) t)
+ (setf (armorp ctx) t)
(op-export ctx "McTester" out)))
(gpgme:with-context (ctx :armor t)
(with-output-to-string (out)
(gpgme:op-export ctx "McTester" out)))
+(gpgme:with-context (ctx :armor t)
+ (let ((recipient1 (gpgme:get-key ctx "DEADBEEF"))
+ (recipient2 (gpgme:get-key ctx "Alice"))
+ (message "Hello, world!"))
+ (with-output-to-string (out)
+ (with-input-from-string (in message)
+ (gpgme:op-encrypt ctx (vector recipient1 recipient2) in out)))))
+
+(gpgme:with-context (ctx :armor t)
+ (let ((message "Hello, world!"))
+ (with-output-to-string (out)
+ (with-input-from-string (in message)
+ (gpgme:op-sign ctx in out)))))
+
TODO
----