-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update documentation for move to asn1crypto
[skip ci]
- Loading branch information
Danielle Madeley
committed
Sep 4, 2017
1 parent
886ff57
commit c6d442d
Showing
5 changed files
with
20 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
def biginteger(value): | ||
""" | ||
Returns a PKCS#11 biginteger bytestream from a Python integer or | ||
similar type (e.g. :class:`pyasn1.type.univ.Integer`). | ||
similar type (e.g. :class:`asn1crypto.core.Integer`). | ||
:param int value: Value | ||
:rtype: bytes | ||
""" | ||
|
||
value = int(value) # In case it's a PyASN1 type or similar | ||
value = int(value) # In case it's a asn1 type or similar | ||
|
||
return value.to_bytes((value.bit_length() + 7) // 8, | ||
byteorder='big') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters