-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from mediachain/yn-key-class-refactor
Refactor signing keys, Publisher Id into classes
- Loading branch information
Showing
30 changed files
with
220 additions
and
74 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
publisherIdB58: '4XTTM4JKrrBeAK6qXmo8FoKmT5RkfjeXfZrnWjJNw9fKvPnEs', | ||
privateKeyB58: 'K3TgUMffighKb23qdfq8oyJM4ByiG3nMgKMHNQeTFEKtfDJzGaTeEzJzp1BUmPYikTtzrgyiEg8DGSfWXemtWh5APs2a8K8hpfHYwhmvxh35YdGrrYHgMEpxFxCEEiaRkN7oDt7q', | ||
message: Buffer.from('This message was signed with a key generated by concat', 'utf-8'), | ||
signature: Buffer.from('Id02py5k9yGJBYQ6/W1qOThAdF9Y5LQySQGbCQdV+pYou+xNeRG26sIJQCZ3B/9SQ/CpJfZjwr+QjwydNWg6Ag==', 'base64') | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const path = require('path') | ||
const mkdirp = require('mkdirp') | ||
const {PublisherId} = require('../../lib/peer/identity') | ||
|
||
const NUM_IDS = 20 | ||
const outputDir = path.join(__dirname, 'publisher_ids') | ||
mkdirp.sync(outputDir) | ||
|
||
const promises = [] | ||
for (let i = 0; i < NUM_IDS; i++) { | ||
promises.push( | ||
PublisherId.generate().then(id => | ||
id.save(path.join(outputDir, `${id.id58}.id`))) | ||
) | ||
} | ||
|
||
Promise.all(promises).then(ids => { | ||
console.log(`wrote ${ids.length} ids to ${outputDir}`) | ||
}) |
1 change: 1 addition & 0 deletions
1
test/resources/publisher_ids/4XTTM2UhNoDF1EfwonksnNN1zRGcZCMFutDRMtXYgciwiLzCf.id
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
`���\t�N���ia�ɥ6u&"��ӿ����E*�/�}������*#�W�؊���(��բ4��/�}������*#�W�؊���(��բ4� |
1 change: 1 addition & 0 deletions
1
test/resources/publisher_ids/4XTTM33j1mHcbg5ctzCmsmvaiUCixX5jxTbkKHm2vCokC6uxw.id
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
`�4̌6�F���E���Q��K���X+_��O�'m�Z4I�����7}:�9�%��'��Y^�>�>TZ4I�����7}:�9�%��'��Y^�>�>T |
Binary file added
BIN
+100 Bytes
test/resources/publisher_ids/4XTTM3NVNm4VryWP91VXdEeoDXC2NzZkKRvUmPMnb1JdosJFk.id
Binary file not shown.
1 change: 1 addition & 0 deletions
1
test/resources/publisher_ids/4XTTM6UEBfKSWUnC4KERbW8hesAAAGgrZcu68AXqihsFvU8w6.id
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
`�-N����xV�څ��]�N�lSP]u��]�F'xO40r��e��v�Ìw*���A7;�YO40r��e��v�Ìw*���A7;�Y |
1 change: 1 addition & 0 deletions
1
test/resources/publisher_ids/4XTTM6UNDgjn7Y6FqnGyKiRf7NmqKzi7ofeh3ZRzFGmv5tkyQ.id
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
`�`�Q8➭��)�^=ˢ��Yh�d��[ф`��O=E���JL�4���,^3P��K��겑�.�O=E���JL�4���,^3P��K��겑�.� |
Binary file added
BIN
+100 Bytes
test/resources/publisher_ids/4XTTM7xSyXgsrwG83aXEKt5Edp9LFmqxCxum1ABXAXDw5QHHy.id
Binary file not shown.
2 changes: 2 additions & 0 deletions
2
test/resources/publisher_ids/4XTTMATDw8fXWT5BGGaoc4A2sEbnLmMYBbekYnznDJ9K8c2cg.id
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`������4�s����G���� | ||
�3<�Z��rٌ �aJ�H�ɦge���qkZ�y��6��F>R��aJ�H�ɦge���qkZ�y��6��F>R�� |
1 change: 1 addition & 0 deletions
1
test/resources/publisher_ids/4XTTMAhtTw2zgTVa5XFxHKeXcJGftdCVmsGR5zYzGspdLr2qf.id
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
`�Ibe� �(.�3md>=�u�?�7H��5��Î"������@^�7�$YB`�ъA�.z~B�"������@^�7�$YB`�ъA�.z~B |
2 changes: 2 additions & 0 deletions
2
test/resources/publisher_ids/4XTTMB2cFTq23PTFGEdeT93cLdNptcSUekShxoUp5vzkjbkA4.id
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`� | ||
�E��ZΦ,t!M�j��h��B#���ג�x�f�Z`��]�� ��� ~궱�ML=���x�f�Z`��]�� ��� ~궱�ML=� |
1 change: 1 addition & 0 deletions
1
test/resources/publisher_ids/4XTTMBauYYKRkmWLyDwdU2sb4JgQX7VoZwwkPpmeFqrQoWWt7.id
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
`��f��|��S5�rB��� ֮I�s�Qs4�Gm��4��)?�[���shN8�CuB����a��˰�4��)?�[���shN8�CuB����a��˰ |
Binary file added
BIN
+100 Bytes
test/resources/publisher_ids/4XTTMCh4xe8E49486DUFko3cmqak3vrymKd5kMUBAVhMbxUkj.id
Binary file not shown.
1 change: 1 addition & 0 deletions
1
test/resources/publisher_ids/4XTTMDi5msCJgo8GFAHvZkE57cCK4QCPRQSrUSQcPMqQexT3E.id
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
`Iu^����L���Ly�g�9�O�܋ݹ'�;��vv�-VI�Z��8=�g��T��읟q�;��vv�-VI�Z��8=�g��T��읟q | ||
|
1 change: 1 addition & 0 deletions
1
test/resources/publisher_ids/4XTTMEj74YR3oT18Uh1ZR1DbWpG5BXftvcSnyrwC6JbgS9AcG.id
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
`�(F�Ҋ�Ď�P��m�Ft����aa�m+@���Wt��#�7�ͽ��e�`�A�u��Y����q��Wt��#�7�ͽ��e�`�A�u��Y����q |
2 changes: 2 additions & 0 deletions
2
test/resources/publisher_ids/4XTTMF7HGrVmmnFATLrCMwboCDxnnm6CPcC8dyE8Tigfb5kYh.id
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
`/��r�l� �4 | ||
!���fU7���@�@��>�EϏ��s�W�Ȝ����=��u�m��n�'��Ϗ��s�W�Ȝ����=��u�m��n�'�� |
Oops, something went wrong.