Skip to content

Commit

Permalink
refactor(crypto)!: remove unused hexStringToByte function
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Jun 16, 2021
1 parent df37004 commit ed39a76
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/utils/crypto.js
Expand Up @@ -152,25 +152,6 @@ export function decodeBase58Check (str) {
return bs58check.decode(str)
}

/**
* Conver hex string to Uint8Array
* @rtype (str: String) => Uint8Array
* @param {String} str - Data to conver
* @return {Uint8Array} - converted data
*/
export function hexStringToByte (str) {
if (!str) {
return new Uint8Array()
}

const a = []
for (let i = 0, len = str.length; i < len; i += 2) {
a.push(parseInt(str.substr(i, 2), 16))
}

return new Uint8Array(a)
}

/**
* Converts a positive integer to the smallest possible
* representation in a binary digit representation
Expand Down

0 comments on commit ed39a76

Please sign in to comment.