+ raise e
+
+ def add_pubkey(self, email, key):
+ if email not in self.pubkeys:
+ self.pubkeys[email] = key.encode()
+ else:
+ raise KeyError('{0}: Exists'.format(email))
+
+ def update_pubkey(self, email, key):
+ self.pubkeys[email] = key.encode()
+
+ def delete_pubkey(self, email):
+ if email in self.pubkeys:
+ del self.pubkeys[email]
+
+ def get_pubkey(self, email):
+ if email in self.pubkeys:
+ key = self.pubkeys[email]
+ key = PublicKey(key)
+ else:
+ key = None
+
+ return key
+