UNPKG

@yuxilabs/gptp-core

Version:

Core validation, formatting and execution logic for the GPTP file format.

6 lines (5 loc) 205 B
import crypto from 'crypto'; export function sha256Hex(data) { const text = typeof data === 'string' ? data : JSON.stringify(data); return crypto.createHash('sha256').update(text).digest('hex'); }