10 lines
301 B
TypeScript
10 lines
301 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}`)
|
|
}
|