Files
xahau.js/src/common/hashes/sha512Half.ts
2019-12-17 10:35:59 -08:00

12 lines
233 B
TypeScript

import {createHash} from 'crypto'
const sha512Half = (hex: string): string => {
return createHash('sha512')
.update(Buffer.from(hex, 'hex'))
.digest('hex')
.toUpperCase()
.slice(0, 64)
}
export default sha512Half