Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vereign Client Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Code
Vereign Client Library
Commits
66154b7d
Commit
66154b7d
authored
5 years ago
by
Sasha Ilieva
Browse files
Options
Downloads
Patches
Plain Diff
Set RNG
parent
9b4f47f7
No related branches found
No related tags found
1 merge request
!88
908 account recovery ability to add contacts to trusted contacts list for account recovery
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
javascript/src/iframe/viamapi-iframe.js
+5
-1
5 additions, 1 deletion
javascript/src/iframe/viamapi-iframe.js
javascript/src/utilities/secrets.js
+3
-0
3 additions, 0 deletions
javascript/src/utilities/secrets.js
with
8 additions
and
1 deletion
javascript/src/iframe/viamapi-iframe.js
+
5
−
1
View file @
66154b7d
...
@@ -44,7 +44,9 @@ import {
...
@@ -44,7 +44,9 @@ import {
initSecrets
,
initSecrets
,
generateRecoveryKey
,
generateRecoveryKey
,
divideSecretToShares
,
divideSecretToShares
,
combineSecret
combineSecret
,
setRNG
,
getSecretsConfig
}
from
"
../utilities/secrets
"
;
}
from
"
../utilities/secrets
"
;
const
penpalMethods
=
require
(
"
../../temp/penpal-methods
"
).
default
;
const
penpalMethods
=
require
(
"
../../temp/penpal-methods
"
).
default
;
...
@@ -976,6 +978,8 @@ const connection = Penpal.connectToParent({
...
@@ -976,6 +978,8 @@ const connection = Penpal.connectToParent({
contactsGetTrusteeContactsPublicKeys
:
async
()
=>
{
contactsGetTrusteeContactsPublicKeys
:
async
()
=>
{
try
{
try
{
initSecrets
();
initSecrets
();
setRNG
(
"
browserCryptoGetRandomValues
"
);
getSecretsConfig
();
console
.
log
(
"
getting public keys
"
);
console
.
log
(
"
getting public keys
"
);
const
response
=
await
executeRestfulFunction
(
const
response
=
await
executeRestfulFunction
(
"
private
"
,
"
private
"
,
...
...
This diff is collapsed.
Click to expand it.
javascript/src/utilities/secrets.js
+
3
−
0
View file @
66154b7d
...
@@ -5,6 +5,9 @@ import secrets from "../lib/secrets";
...
@@ -5,6 +5,9 @@ import secrets from "../lib/secrets";
*/
*/
export
const
initSecrets
=
(
bits
,
rngType
)
=>
secrets
.
init
(
bits
,
rngType
);
export
const
initSecrets
=
(
bits
,
rngType
)
=>
secrets
.
init
(
bits
,
rngType
);
export
const
setRNG
=
rngType
=>
secrets
.
setRNG
(
rngType
);
export
const
getSecretsConfig
=
()
=>
secrets
.
getConfig
();
/**
/**
* Function generates a random bits length string, and output it in hexadecimal format
* Function generates a random bits length string, and output it in hexadecimal format
*
*
...
...
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