lib/encryption.js
// Create a cryptographic hash using salt

Create a cryptographic hash using salt
Create a cryptographic hash using salt
digest(plaintext) {
        const hash = crypto.createHash('sha256');
        hash.update(plaintext);
        hash.update(secret);
        return hash.digest('hex'); 
    }
digest ( plaintext ) { const hash = crypto . createHash ( 'sha256' ) ; hash . update ( plaintext ) ; hash . update ( secret ) ; return hash . digest ( 'hex' ) ; }
Create a cryptographic hash using salt
Create a cryptographic hash using salt
// generates final value as hex
