/    Sign up×
Community /Pin to ProfileBookmark

Using ES6 with Crypto Api

I have a task that I need to solve, but I have been watching tutorial after tutorial for days without getting any wiser.
I want to create an application that extracts data from the crypto API, using ES6 features like Object Literals and Arrow functions. It is needed for a student project.

When I look up crypto API I get a lot of tutorials of people using React, Angular etc. I am not too happy about jumping into those, because it is not something I have had lessons in, so I am going to be screwed if my teacher asks me questions about these.
I have only learned about ES6 and Babel, and after I have made my crypto application, I will need to Bundle the code with WebPack and convert it into ES5 with Babel.

I have this old code, where I just removed var with let and const, but other than that I can’t really see what more I can do with it.

`const array = new Uint32Array(10);
window.crypto.getRandomValues(array);
console.log(“Here are some numbers:”);
for (let i = 0; i < array.length; i++) {
console.log(array[i]);
}`

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @m87dk spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...