+ (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))
+
+(defun epg-make-key (owner-trust)
+ "Return a key object."
+ (cons 'epg-key (vector owner-trust nil nil)))
+
+(defun epg-key-owner-trust (key)
+ "Return the owner trust of KEY."
+ (unless (eq (car key) 'epg-key)
+ (signal 'wrong-type-argument (list 'epg-key-p key)))
+ (aref (cdr key) 0))
+
+(defun epg-key-sub-key-list (key)
+ "Return the sub key list of KEY."
+ (unless (eq (car key) 'epg-key)
+ (signal 'wrong-type-argument (list 'epg-key-p key)))
+ (aref (cdr key) 1))
+
+(defun epg-key-user-id-list (key)
+ "Return the user ID list of KEY."
+ (unless (eq (car key) 'epg-key)
+ (signal 'wrong-type-argument (list 'epg-key-p key)))
+ (aref (cdr key) 2))
+
+(defun epg-key-set-sub-key-list (key sub-key-list)
+ "Set the sub key list of KEY."
+ (unless (eq (car key) 'epg-key)
+ (signal 'wrong-type-argument (list 'epg-key-p key)))
+ (aset (cdr key) 1 sub-key-list))
+
+(defun epg-key-set-user-id-list (key user-id-list)
+ "Set the user ID list of KEY."
+ (unless (eq (car key) 'epg-key)
+ (signal 'wrong-type-argument (list 'epg-key-p key)))
+ (aset (cdr key) 2 user-id-list))
+
+(defun epg-make-sub-key (validity capability secret-p algorithm length id
+ creation-time expiration-time)
+ "Return a sub key object."
+ (cons 'epg-sub-key
+ (vector validity capability secret-p algorithm length id creation-time
+ expiration-time nil)))
+
+(defun epg-sub-key-validity (sub-key)
+ "Return the validity of SUB-KEY."
+ (unless (eq (car sub-key) 'epg-sub-key)
+ (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
+ (aref (cdr sub-key) 0))
+
+(defun epg-sub-key-capability (sub-key)
+ "Return the capability of SUB-KEY."
+ (unless (eq (car sub-key) 'epg-sub-key)
+ (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
+ (aref (cdr sub-key) 1))
+
+(defun epg-sub-key-secret-p (sub-key)
+ "Return non-nil if SUB-KEY is a secret key."
+ (unless (eq (car sub-key) 'epg-sub-key)
+ (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
+ (aref (cdr sub-key) 2))
+
+(defun epg-sub-key-algorithm (sub-key)
+ "Return the algorithm of SUB-KEY."
+ (unless (eq (car sub-key) 'epg-sub-key)
+ (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
+ (aref (cdr sub-key) 3))
+
+(defun epg-sub-key-length (sub-key)
+ "Return the length of SUB-KEY."
+ (unless (eq (car sub-key) 'epg-sub-key)
+ (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
+ (aref (cdr sub-key) 4))
+
+(defun epg-sub-key-id (sub-key)
+ "Return the ID of SUB-KEY."
+ (unless (eq (car sub-key) 'epg-sub-key)
+ (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
+ (aref (cdr sub-key) 5))
+
+(defun epg-sub-key-creation-time (sub-key)
+ "Return the creation time of SUB-KEY."
+ (unless (eq (car sub-key) 'epg-sub-key)
+ (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
+ (aref (cdr sub-key) 6))
+
+(defun epg-sub-key-expiration-time (sub-key)
+ "Return the expiration time of SUB-KEY."
+ (unless (eq (car sub-key) 'epg-sub-key)
+ (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
+ (aref (cdr sub-key) 7))
+
+(defun epg-sub-key-fingerprint (sub-key)
+ "Return the fingerprint of SUB-KEY."
+ (unless (eq (car sub-key) 'epg-sub-key)
+ (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
+ (aref (cdr sub-key) 8))
+
+(defun epg-sub-key-set-fingerprint (sub-key fingerprint)
+ "Set the fingerprint of SUB-KEY.
+This function is for internal use only."
+ (unless (eq (car sub-key) 'epg-sub-key)
+ (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
+ (aset (cdr sub-key) 8 fingerprint))
+
+(defun epg-make-user-id (validity string)
+ "Return a user ID object."
+ (cons 'epg-user-id (vector validity string nil)))
+
+(defun epg-user-id-validity (user-id)
+ "Return the validity of USER-ID."
+ (unless (eq (car user-id) 'epg-user-id)
+ (signal 'wrong-type-argument (list 'epg-user-id-p user-id)))
+ (aref (cdr user-id) 0))
+
+(defun epg-user-id-string (user-id)
+ "Return the name of USER-ID."
+ (unless (eq (car user-id) 'epg-user-id)
+ (signal 'wrong-type-argument (list 'epg-user-id-p user-id)))
+ (aref (cdr user-id) 1))
+
+(defun epg-user-id-signature-list (user-id)
+ "Return the signature list of USER-ID."
+ (unless (eq (car user-id) 'epg-user-id)
+ (signal 'wrong-type-argument (list 'epg-user-id-p user-id)))
+ (aref (cdr user-id) 2))
+
+(defun epg-user-id-set-signature-list (user-id signature-list)
+ "Set the signature list of USER-ID."
+ (unless (eq (car user-id) 'epg-user-id)
+ (signal 'wrong-type-argument (list 'epg-user-id-p user-id)))
+ (aset (cdr user-id) 2 signature-list))
+
+(defun epg-make-key-signature (validity pubkey-algorithm key-id creation-time
+ expiration-time user-id class
+ exportable-p)
+ "Return a key signature object."
+ (cons 'epg-key-signature
+ (vector validity pubkey-algorithm key-id creation-time expiration-time
+ user-id class exportable-p)))
+
+(defun epg-key-signature-validity (key-signature)
+ "Return the validity of KEY-SIGNATURE."
+ (unless (eq (car key-signature) 'epg-key-signature)
+ (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
+ (aref (cdr key-signature) 0))
+
+(defun epg-key-signature-pubkey-algorithm (key-signature)
+ "Return the public key algorithm of KEY-SIGNATURE."
+ (unless (eq (car key-signature) 'epg-key-signature)
+ (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
+ (aref (cdr key-signature) 1))
+
+(defun epg-key-signature-key-id (key-signature)
+ "Return the key-id of KEY-SIGNATURE."
+ (unless (eq (car key-signature) 'epg-key-signature)
+ (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
+ (aref (cdr key-signature) 2))
+
+(defun epg-key-signature-creation-time (key-signature)
+ "Return the creation time of KEY-SIGNATURE."
+ (unless (eq (car key-signature) 'epg-key-signature)
+ (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
+ (aref (cdr key-signature) 3))
+
+(defun epg-key-signature-expiration-time (key-signature)
+ "Return the expiration time of KEY-SIGNATURE."
+ (unless (eq (car key-signature) 'epg-key-signature)
+ (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
+ (aref (cdr key-signature) 4))
+
+(defun epg-key-signature-user-id (key-signature)
+ "Return the user-id of KEY-SIGNATURE."
+ (unless (eq (car key-signature) 'epg-key-signature)
+ (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
+ (aref (cdr key-signature) 5))
+
+(defun epg-key-signature-class (key-signature)
+ "Return the class of KEY-SIGNATURE."
+ (unless (eq (car key-signature) 'epg-key-signature)
+ (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
+ (aref (cdr key-signature) 6))
+
+(defun epg-key-signature-exportable-p (key-signature)
+ "Return t if KEY-SIGNATURE is exportable."
+ (unless (eq (car key-signature) 'epg-key-signature)
+ (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
+ (aref (cdr key-signature) 7))