Files
points-mall/supplied-service/netlify/utils/crypto.ts
T
2026-07-28 15:43:27 +08:00

10 lines
316 B
TypeScript

import CryptoJS from 'crypto-js'
export const sha256 = (value: string) => {
return CryptoJS.SHA256(value).toString(CryptoJS.enc.Hex)
}
export const createBridgeSignature = (clientId: string, clientSecret: string, timestamp: string) => {
return sha256(`${clientId}${clientSecret}${timestamp}${clientSecret}`)
}