From 628c63e5f67e0d6069f8c385068469db912d2fa7 Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 17 Apr 2006 08:35:12 +0000 Subject: [PATCH] Added cipher-algorithm, digest-algorithm, compress-algorithm to epg-context. --- epg.el | 65 +++++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 19 deletions(-) diff --git a/epg.el b/epg.el index e3ff7cd..243b0a3 100644 --- a/epg.el +++ b/epg.el @@ -133,23 +133,26 @@ "Return the string of DATA." (aref data 1)) -(defun epg-make-context (&optional protocol armor textmode include-certs) +(defun epg-make-context (&optional protocol armor textmode include-certs + cipher-algorithm digest-algorithm + compress-algorithm) "Return a context object." (vector protocol armor textmode include-certs + cipher-algorithm digest-algorithm compress-algorithm #'epg-passphrase-callback-function #'epg-progress-callback-function nil nil nil nil)) (defun epg-context-protocol (context) - "Return the protocol used within the context." + "Return the protocol used within CONTEXT." (aref context 0)) (defun epg-context-armor (context) - "Return t if the output shouled be ASCII armored in the CONTEXT context." + "Return t if the output shouled be ASCII armored in CONTEXT." (aref context 1)) (defun epg-context-textmode (context) - "Return t if canonical text mode should be used in the CONTEXT context." + "Return t if canonical text mode should be used in CONTEXT." (aref context 2)) (defun epg-context-include-certs (context) @@ -157,74 +160,98 @@ message." (aref context 3)) +(defun epg-context-cipher-algorithm (context) + "Return the cipher algorithm in CONTEXT." + (aref context 4)) + +(defun epg-context-digest-algorithm (context) + "Return the digest algorithm in CONTEXT." + (aref context 5)) + +(defun epg-context-compress-algorithm (context) + "Return the compress algorithm in CONTEXT." + (aref context 6)) + (defun epg-context-passphrase-callback (context) "Return the function used to query passphrase." - (aref context 4)) + (aref context 7)) (defun epg-context-progress-callback (context) "Return the function which handles progress update." - (aref context 5)) + (aref context 8)) (defun epg-context-signers (context) "Return the list of key-id for singning." - (aref context 6)) + (aref context 9)) (defun epg-context-process (context) "Return the process object of `epg-gpg-program'. This function is for internal use only." - (aref context 7)) + (aref context 10)) (defun epg-context-output-file (context) "Return the output file of `epg-gpg-program'. This function is for internal use only." - (aref context 8)) + (aref context 11)) (defun epg-context-result (context) "Return the result of the previous cryptographic operation." - (aref context 9)) + (aref context 12)) (defun epg-context-set-protocol (context protocol) - "Set the protocol used within the context." + "Set the protocol used within CONTEXT." (aset context 0 protocol)) (defun epg-context-set-armor (context armor) - "Specify if the output shouled be ASCII armored in the CONTEXT context." + "Specify if the output shouled be ASCII armored in CONTEXT." (aset context 1 armor)) (defun epg-context-set-textmode (context textmode) - "Specify if canonical text mode should be used in the CONTEXT context." + "Specify if canonical text mode should be used in CONTEXT." (aset context 2 textmode)) (defun epg-context-set-include-certs (context include-certs) "Set how many certificates should be included in an S/MIME signed message." (aset context 3 include-certs)) +(defun epg-context-set-cipher-algorithm (context cipher-algorithm) + "Set the cipher algorithm in CONTEXT." + (aset context 4 cipher-algorithm)) + +(defun epg-context-set-digest-algorithm (context digest-algorithm) + "Set the digest algorithm in CONTEXT." + (aset context 5 digest-algorithm)) + +(defun epg-context-set-compress-algorithm (context compress-algorithm) + "Set the compress algorithm in CONTEXT." + (aset context 6 compress-algorithm)) + (defun epg-context-set-passphrase-callback (context passphrase-callback) "Set the function used to query passphrase." - (aset context 4 passphrase-callback)) + (aset context 7 passphrase-callback)) (defun epg-context-set-progress-callback (context progress-callback) "Set the function which handles progress update." - (aset context 5 progress-callback)) + (aset context 8 progress-callback)) (defun epg-context-set-signers (context signers) "Set the list of key-id for singning." - (aset context 6 signers)) + (aset context 9 signers)) (defun epg-context-set-process (context process) "Set the process object of `epg-gpg-program'. This function is for internal use only." - (aset context 7 process)) + (aset context 10 process)) (defun epg-context-set-output-file (context output-file) "Set the output file of `epg-gpg-program'. This function is for internal use only." - (aset context 8 output-file)) + (aset context 11 output-file)) (defun epg-context-set-result (context result) "Set the result of the previous cryptographic operation." - (aset context 9 result)) + (aset context 12 result)) (defun epg-make-signature (status key-id user-id) "Return a signature object." -- 1.7.10.4