mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-19 19:55:51 +00:00
12 lines
233 B
TypeScript
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
|