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
Merge requests
!14
138 information for devices clients
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
138 information for devices clients
138-information-for-devices-clients
into
master
Overview
2
Commits
5
Pipelines
0
Changes
1
Merged
Igor Markin
requested to merge
138-information-for-devices-clients
into
master
6 years ago
Overview
2
Commits
5
Pipelines
0
Changes
1
Expand
Related ticket
https://code.vereign.com/code/dashboard/issues/138
0
0
Merge request reports
Viewing commit
5c081211
Prev
Next
Show latest version
1 file
+
3
−
2
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
5c081211
Fix bug with creation of device hash.
· 5c081211
Markin Igor
authored
6 years ago
javascript/src/utilities/appUtility.js
+
3
−
2
Options
@@ -4,8 +4,9 @@ export const createDeviceHash = async (publicKey) => {
@@ -4,8 +4,9 @@ export const createDeviceHash = async (publicKey) => {
try
{
try
{
const
stringToEncode
=
publicKey
+
navigator
.
userAgent
;
const
stringToEncode
=
publicKey
+
navigator
.
userAgent
;
const
crypto
=
getCrypto
();
const
crypto
=
getCrypto
();
const
buffer
=
new
window
.
TextEncoder
(
"
utf-8
"
).
encode
(
stringToEncode
);
const
buffer
=
new
window
.
TextEncoder
().
encode
(
stringToEncode
);
return
window
.
btoa
(
await
crypto
.
digest
({
name
:
"
SHA-1
"
},
buffer
));
const
hash
=
await
crypto
.
digest
({
name
:
"
SHA-1
"
},
buffer
);
return
window
.
btoa
(
String
.
fromCharCode
(...
new
Uint8Array
(
hash
)));
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
warn
(
error
);
// eslint-disable-line no-console
console
.
warn
(
error
);
// eslint-disable-line no-console
}
}
Loading