Actually use SHA512, not 256

This commit is contained in:
Julia Friesel
2018-09-13 16:52:54 +02:00
parent 34648a3d89
commit f2f0278a1c
2 changed files with 6 additions and 5 deletions
+1 -2
View File
@@ -6,10 +6,9 @@ const crypto = require('crypto')
rnBridge.channel.on('message', (msg) => {
msg = JSON.parse(msg)
if (msg.type === 'request-SHA512') {
const hash = crypto.createHash('sha256')
const hash = crypto.createHash('sha512')
hash.update(msg.message)
const result = hash.digest('hex')
console.log(result)
rnBridge.channel.send(JSON.stringify({
type: 'sha512',
message: result