sha256 encryption

sha256:

  1. Install using npm: npm install js-sha256

  2. Then define the method in the methods of the component, when calling

  

// sha256 encrypted password 
setSha(){
     let sha256 = require( " js-sha256 " ).sha256 // The require method is used here 
     this .password = sha256( this .passWord) // The password to be encrypted 
     console.log( this .password) // This is you encrypted password 
     }

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324576264&siteId=291194637