Skip to content

Commit

Permalink
added log to string to hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Danushka96 committed Nov 17, 2024
1 parent f80dc85 commit 2a81d02
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/onepay-payment-request.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const OnepayPaymentRequest = () => {
const generateHash = async (data: typeof initialFormData, salt: string) => {
const jsonString = JSON.stringify(data).replace(/\s/g, '')
const stringToHash = jsonString + salt
console.log(stringToHash)
const encoder = new TextEncoder()
const data_encoded = encoder.encode(stringToHash)
const hashBuffer = await crypto.subtle.digest('SHA-256', data_encoded)
Expand Down

0 comments on commit 2a81d02

Please sign in to comment.