- (aset context 12 result))
-
-(defun epg-make-verify-result (status key-id user-id)
- "Return a verify-result object."
- (vector status key-id user-id nil nil))
-
-(defun epg-verify-result-status (verify-result)
- "Return the status code of VERIFY-RESULT."
- (aref verify-result 0))
-
-(defun epg-verify-result-key-id (verify-result)
- "Return the key-id of VERIFY-RESULT."
- (aref verify-result 1))
-
-(defun epg-verify-result-user-id (verify-result)
- "Return the user-id of VERIFY-RESULT."
- (aref verify-result 2))
-
-(defun epg-verify-result-validity (verify-result)
- "Return the validity of VERIFY-RESULT."
- (aref verify-result 3))
-
-(defun epg-verify-result-fingerprint (verify-result)
- "Return the fingerprint of VERIFY-RESULT."
- (aref verify-result 4))
-
-(defun epg-verify-result-set-status (verify-result status)
- "Set the status code of VERIFY-RESULT."
- (aset verify-result 0 status))
-
-(defun epg-verify-result-set-key-id (verify-result key-id)
- "Set the key-id of VERIFY-RESULT."
- (aset verify-result 1 key-id))
-
-(defun epg-verify-result-set-user-id (verify-result user-id)
- "Set the user-id of VERIFY-RESULT."
- (aset verify-result 2 user-id))
-
-(defun epg-verify-result-set-validity (verify-result validity)
- "Set the validity of VERIFY-RESULT."
- (aset verify-result 3 validity))
-
-(defun epg-verify-result-set-fingerprint (verify-result fingerprint)
- "Set the fingerprint of VERIFY-RESULT."
- (aset verify-result 4 fingerprint))
+ (unless (eq (car context) 'epg-context)
+ (signal 'wrong-type-argument (list 'epg-context-p context)))
+ (aset (cdr context) 12 result))
+
+(defun epg-context-set-operation (context operation)
+ "Set the name of the current cryptographic operation."
+ (unless (eq (car context) 'epg-context)
+ (signal 'wrong-type-argument (list 'epg-context-p context)))
+ (aset (cdr context) 13 operation))
+
+(defun epg-make-signature (status &optional key-id)
+ "Return a signature object."
+ (cons 'epg-signature (vector status key-id nil nil nil nil nil nil nil nil)))
+
+(defun epg-signature-status (signature)
+ "Return the status code of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aref (cdr signature) 0))
+
+(defun epg-signature-key-id (signature)
+ "Return the key-id of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aref (cdr signature) 1))
+
+(defun epg-signature-validity (signature)
+ "Return the validity of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aref (cdr signature) 2))
+
+(defun epg-signature-fingerprint (signature)
+ "Return the fingerprint of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aref (cdr signature) 3))
+
+(defun epg-signature-creation-time (signature)
+ "Return the creation time of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aref (cdr signature) 4))
+
+(defun epg-signature-expiration-time (signature)
+ "Return the expiration time of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aref (cdr signature) 5))
+
+(defun epg-signature-pubkey-algorithm (signature)
+ "Return the public key algorithm of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aref (cdr signature) 6))
+
+(defun epg-signature-digest-algorithm (signature)
+ "Return the digest algorithm of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aref (cdr signature) 7))
+
+(defun epg-signature-class (signature)
+ "Return the class of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aref (cdr signature) 8))
+
+(defun epg-signature-version (signature)
+ "Return the version of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aref (cdr signature) 9))
+
+(defun epg-signature-set-status (signature status)
+ "Set the status code of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aset (cdr signature) 0 status))
+
+(defun epg-signature-set-key-id (signature key-id)
+ "Set the key-id of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aset (cdr signature) 1 key-id))
+
+(defun epg-signature-set-validity (signature validity)
+ "Set the validity of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aset (cdr signature) 2 validity))
+
+(defun epg-signature-set-fingerprint (signature fingerprint)
+ "Set the fingerprint of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aset (cdr signature) 3 fingerprint))
+
+(defun epg-signature-set-creation-time (signature creation-time)
+ "Set the creation time of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aset (cdr signature) 4 creation-time))
+
+(defun epg-signature-set-expiration-time (signature expiration-time)
+ "Set the expiration time of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aset (cdr signature) 5 expiration-time))
+
+(defun epg-signature-set-pubkey-algorithm (signature pubkey-algorithm)
+ "Set the public key algorithm of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aset (cdr signature) 6 pubkey-algorithm))
+
+(defun epg-signature-set-digest-algorithm (signature digest-algorithm)
+ "Set the digest algorithm of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aset (cdr signature) 7 digest-algorithm))
+
+(defun epg-signature-set-class (signature class)
+ "Set the class of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aset (cdr signature) 8 class))
+
+(defun epg-signature-set-version (signature version)
+ "Set the version of SIGNATURE."
+ (unless (eq (car signature) 'epg-signature)
+ (signal 'wrong-type-argument (list 'epg-signature-p signature)))
+ (aset (cdr signature) 9 version))
+
+(defun epg-make-new-signature (type pubkey-algorithm digest-algorithm
+ class creation-time fingerprint)
+ "Return a new signature object."
+ (cons 'epg-new-signature (vector type pubkey-algorithm digest-algorithm
+ class creation-time fingerprint)))
+
+(defun epg-new-signature-type (new-signature)
+ "Return the type of NEW-SIGNATURE."
+ (unless (eq (car new-signature) 'epg-new-signature)
+ (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
+ (aref (cdr new-signature) 0))
+
+(defun epg-new-signature-pubkey-algorithm (new-signature)
+ "Return the public key algorithm of NEW-SIGNATURE."
+ (unless (eq (car new-signature) 'epg-new-signature)
+ (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
+ (aref (cdr new-signature) 1))
+
+(defun epg-new-signature-digest-algorithm (new-signature)
+ "Return the digest algorithm of NEW-SIGNATURE."
+ (unless (eq (car new-signature) 'epg-new-signature)
+ (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
+ (aref (cdr new-signature) 2))
+
+(defun epg-new-signature-class (new-signature)
+ "Return the class of NEW-SIGNATURE."
+ (unless (eq (car new-signature) 'epg-new-signature)
+ (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
+ (aref (cdr new-signature) 3))
+
+(defun epg-new-signature-creation-time (new-signature)
+ "Return the creation time of NEW-SIGNATURE."
+ (unless (eq (car new-signature) 'epg-new-signature)
+ (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
+ (aref (cdr new-signature) 4))
+
+(defun epg-new-signature-fingerprint (new-signature)
+ "Return the fingerprint of NEW-SIGNATURE."
+ (unless (eq (car new-signature) 'epg-new-signature)
+ (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
+ (aref (cdr new-signature) 5))