Add docstring comments

pull/43/head
tuxxy 2017-09-18 11:30:24 -07:00
parent b496480b3f
commit d432d5f51d
1 changed files with 16 additions and 0 deletions

View File

@ -12,7 +12,23 @@ class EncryptingKeypair(object):
self.pub_key = self.pre.priv2pub(self.priv_key)
def encrypt(self, data):
"""
Encrypts the data provided.
:param bytes data: The data to encrypt
:rtype: bytes
:return: Encrypted ciphertext
"""
return self.pre.encrypt(self.pub_key, data)
def decrypt(self, enc_data):
"""
Decrypts the data provided
:param bytes enc_data: Decrypts the data provided
:rtype: bytes
:return: Decrypted plaintext
"""
return self.pre.decrypt(self.priv_key, enc_data)