From 059f819c9c90570cd1fefbb2a5a454b6848a148c Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 23 Mar 2020 11:43:51 -0700 Subject: [PATCH] Use """ instead of ''' for docstrings. --- src/mega/crypto.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mega/crypto.py b/src/mega/crypto.py index 2c60cfb..7737712 100644 --- a/src/mega/crypto.py +++ b/src/mega/crypto.py @@ -104,11 +104,11 @@ def str_to_a32(b): def mpi_to_int(s): - ''' + """ A Multi-precision integer is encoded as a series of bytes in big-endian order. The first two bytes are a header which tell the number of bits in the integer. The rest of the bytes are the integer. - ''' + """ return int(binascii.hexlify(s[2:]), 16) def extended_gcd(a, b): @@ -119,10 +119,10 @@ def extended_gcd(a, b): return (g, x - (b // a) * y, y) def modular_inverse(a, m): - ''' + """ Thank you Mart Bakhoff for this solution. https://stackoverflow.com/a/9758173 - ''' + """ g, x, y = extended_gcd(a, m) if g != 1: raise Exception('modular inverse does not exist')