Skip to content

Commit

Permalink
Merge pull request #6470 from blockchain/fix/login-tfa
Browse files Browse the repository at this point in the history
fix(login-tfa): Change crypto implementation used in 2FA.
  • Loading branch information
CTucker-BC authored Sep 27, 2024
2 parents 67d6e23 + 1ad7d33 commit ff1211a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/blockchain-wallet-v4/src/types/Wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ import * as Options from './Options'
import Type from './Type'
import * as Wallet from './Wallet'

let _window = {}
if (typeof window === 'undefined' || !window) _window = {}
else _window = window

// Global Crypto object
const { Crypto } = _window

const PAYLOAD_VERSION = crypto.SUPPORTED_ENCRYPTION_VERSION

/* Wrapper :: {
Expand Down Expand Up @@ -149,7 +142,7 @@ export const fromEncPayload = curry((password, payload) => {
const wrapper = {
password,
payload: JSON.stringify(payload),
payload_checksum: Crypto ? Crypto.SHA256(JSON.stringify(payload), { asHex: true }) : undefined,
payload_checksum: crypto.sha256(JSON.stringify(payload)).toString('hex'),
pbkdf2Iterations,
version
}
Expand Down

0 comments on commit ff1211a

Please sign in to comment.