summaryrefslogtreecommitdiff
path: root/rsa/bigfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'rsa/bigfile.py')
-rw-r--r--rsa/bigfile.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/rsa/bigfile.py b/rsa/bigfile.py
index ed3fdb9..516cf56 100644
--- a/rsa/bigfile.py
+++ b/rsa/bigfile.py
@@ -13,7 +13,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-"""Large file support
+
+'''Large file support
- break a file into smaller blocks, and encrypt them, and store the
encrypted blocks in another file.
@@ -36,19 +37,19 @@ The encrypted file format is as follows, where || denotes byte concatenation:
This file format is called the VARBLOCK format, in line with the varint format
used to denote the block sizes.
-"""
+'''
from rsa import key, common, pkcs1, varblock
from rsa._compat import byte
def encrypt_bigfile(infile, outfile, pub_key):
- """Encrypts a file, writing it to 'outfile' in VARBLOCK format.
+ '''Encrypts a file, writing it to 'outfile' in VARBLOCK format.
:param infile: file-like object to read the cleartext from
:param outfile: file-like object to write the crypto in VARBLOCK format to
:param pub_key: :py:class:`rsa.PublicKey` to encrypt with
- """
+ '''
if not isinstance(pub_key, key.PublicKey):
raise TypeError('Public key required, but got %r' % pub_key)
@@ -67,13 +68,13 @@ def encrypt_bigfile(infile, outfile, pub_key):
outfile.write(crypto)
def decrypt_bigfile(infile, outfile, priv_key):
- """Decrypts an encrypted VARBLOCK file, writing it to 'outfile'
+ '''Decrypts an encrypted VARBLOCK file, writing it to 'outfile'
:param infile: file-like object to read the crypto in VARBLOCK format from
:param outfile: file-like object to write the cleartext to
:param priv_key: :py:class:`rsa.PrivateKey` to decrypt with
- """
+ '''
if not isinstance(priv_key, key.PrivateKey):
raise TypeError('Private key required, but got %r' % priv_key)