Index: third_party/tlslite/tlslite/utils/cryptomath.py |
diff --git a/third_party/tlslite/tlslite/utils/cryptomath.py b/third_party/tlslite/tlslite/utils/cryptomath.py |
index 385095ddcdc130b8e53782cdb77577610259be1a..86da25e52498d44358a720d0f17c1f170d2bfbe0 100644 |
--- a/third_party/tlslite/tlslite/utils/cryptomath.py |
+++ b/third_party/tlslite/tlslite/utils/cryptomath.py |
@@ -129,8 +129,9 @@ def bytesToNumber(bytes): |
multiplier *= 256 |
return total |
-def numberToBytes(n): |
- howManyBytes = numBytes(n) |
+def numberToBytes(n, howManyBytes=None): |
+ if howManyBytes == None: |
+ howManyBytes = numBytes(n) |
bytes = createByteArrayZeros(howManyBytes) |
for count in range(howManyBytes-1, -1, -1): |
bytes[count] = int(n % 256) |