mirror of https://github.com/nucypher/pyUmbral.git
Use better method for determining keysize in bytes (thanks @cygnusv)
parent
6c2dd86522
commit
92ec0f2a8c
|
@ -41,6 +41,4 @@ def kdf(ecpoint, key_length):
|
|||
|
||||
|
||||
def get_curve_keysize_bytes(curve):
|
||||
# We use the ceil operation to fit all bytes on curve sizes where eight is
|
||||
# not evenly divisible.
|
||||
return int(math.ceil(curve.key_size / 8.00))
|
||||
return (curve.key_size + 7) // 8
|
||||
|
|
Loading…
Reference in New Issue