Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
da1cade5
Commit
da1cade5
authored
10 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Key encoding
parent
40c2513e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_ucoinpy_test/documents/test_transaction.py
+0
-2
0 additions, 2 deletions
_ucoinpy_test/documents/test_transaction.py
ucoinpy/key/__init__.py
+3
-0
3 additions, 0 deletions
ucoinpy/key/__init__.py
with
3 additions
and
2 deletions
_ucoinpy_test/documents/test_transaction.py
+
0
−
2
View file @
da1cade5
...
@@ -100,8 +100,6 @@ class Test_Transaction:
...
@@ -100,8 +100,6 @@ class Test_Transaction:
assert
tx
.
signatures
[
0
]
==
"
42yQm4hGTJYWkPg39hQAUgP6S6EQ4vTfXdJuxKEHL1ih6YHiDL2hcwrFgBHjXLRgxRhj2VNVqqc6b4JayKqTE14r
"
assert
tx
.
signatures
[
0
]
==
"
42yQm4hGTJYWkPg39hQAUgP6S6EQ4vTfXdJuxKEHL1ih6YHiDL2hcwrFgBHjXLRgxRhj2VNVqqc6b4JayKqTE14r
"
def
test_fromraw_toraw
(
self
):
def
test_fromraw_toraw
(
self
):
tx
=
Transaction
.
from_signed_raw
(
tx_raw
)
tx
=
Transaction
.
from_signed_raw
(
tx_raw
)
rendered_tx
=
tx
.
signed_raw
()
rendered_tx
=
tx
.
signed_raw
()
...
...
This diff is collapsed.
Click to expand it.
ucoinpy/key/__init__.py
+
3
−
0
View file @
da1cade5
...
@@ -8,6 +8,7 @@ import base58
...
@@ -8,6 +8,7 @@ import base58
import
base64
import
base64
import
scrypt
import
scrypt
from
nacl.signing
import
SigningKey
as
NaclSigningKey
from
nacl.signing
import
SigningKey
as
NaclSigningKey
from
nacl.encoding
import
Base64Encoder
SEED_LENGTH
=
32
# Length of the key
SEED_LENGTH
=
32
# Length of the key
...
@@ -24,6 +25,8 @@ class SigningKey(NaclSigningKey):
...
@@ -24,6 +25,8 @@ class SigningKey(NaclSigningKey):
SCRYPT_PARAMS
[
'
N
'
],
SCRYPT_PARAMS
[
'
r
'
],
SCRYPT_PARAMS
[
'
p
'
],
SCRYPT_PARAMS
[
'
N
'
],
SCRYPT_PARAMS
[
'
r
'
],
SCRYPT_PARAMS
[
'
p
'
],
SEED_LENGTH
)
SEED_LENGTH
)
seedb64
=
base64
.
b64encode
(
seed
)
seedb64
=
base64
.
b64encode
(
seed
)
super
.
__init__
(
seedb64
,
Base64Encoder
)
self
.
pubkey
=
Base58Encoder
.
encode
(
self
.
verify_key
.
key
)
class
Base58Encoder
(
object
):
class
Base58Encoder
(
object
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment