How can I use the SHA512 encryption algorithm in angular?

0

I want to encrypt certain information when sending it to web service , but I can not find any clear answer to how to use the library SHA512 in angular.

How do I use it from angular ?

    
asked by JGuerra 08.02.2018 в 16:42
source

1 answer

2

Use CryptoJS , it allows you to encrypt in many ways (including SHA512) easily.

You install and use it in the following way:

npm install crypto-js

import * as crypto from 'crypto-js'; 

console.log(crypto.SHA512("string a encriptar").toString()); 
  

Official Documentation: Here

    
answered by 08.02.2018 / 16:54
source