aboutsummaryrefslogtreecommitdiff
path: root/lib/keyring
diff options
context:
space:
mode:
Diffstat (limited to 'lib/keyring')
-rw-r--r--lib/keyring/recipients.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/keyring/recipients.rb b/lib/keyring/recipients.rb
new file mode 100644
index 0000000..4cd9a48
--- /dev/null
+++ b/lib/keyring/recipients.rb
@@ -0,0 +1,26 @@
+module Keyring
+ class Recipients
+ def initialize(aBaseDirectory = '..')
+ @recipientsStore = Backend::RecipientsStore.new(aBaseDirectory)
+
+ end
+ def addRecipient(anEmail, aKeySignature)
+
+ @recipientsStore.load()
+ @recipientsStore.addRecipient(anEmail, aKeySignature)
+ @recipientsStore.save()
+ end
+
+ def removeRecipient(aKeySignature)
+ @recipientsStore.load()
+ @recipientsStore.removeRecipient(aKeySignature)
+ @recipientsStore.save()
+ end
+
+ def listRecipients()
+ @recipientsStore.load()
+
+ return @recipientsStore.getRecipients()
+ end
+ end
+end