File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11# Change Log
22
3+ ## Release 0.2.12
4+ + Export new util functions
5+
36## Release 0.2.11
47+ can import/export private key from openssl standard encrypted base64 format
58+ At the moment PEM PKCS8 format not supported
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ export function isPublicKeyChecksum(publicKey: string): boolean {
152152 * Returns true if the string is a hex string
153153 *
154154 */
155- export function isHexSring ( hex : string ) : boolean {
155+ export function isHexString ( hex : string ) : boolean {
156156 return hex !== null && hex . match ( / ^ [ 0 - 9 a - f ] + $ / gi) !== null
157157}
158158
@@ -161,7 +161,7 @@ export function isHexSring(hex: string): boolean {
161161 * characters from 0 - 9 and a-f
162162 */
163163export function hexToByteArray ( hex : string ) : Uint8Array {
164- if ( ! isHexSring ( hex ) ) {
164+ if ( ! isHexString ( hex ) ) {
165165 throw TypeError ( `the hex string ${ hex } contains non hex characters` )
166166 }
167167 const pairs = hex . match ( / [ 0 - 9 a - f ] { 2 } / gi)
Original file line number Diff line number Diff line change @@ -21,5 +21,9 @@ export {
2121 prefix0x ,
2222 remove0xPrefix ,
2323 toPublicKeyChecksum ,
24+ isHexString ,
25+ hexToByteArray ,
26+ wordArrayToByteArray ,
27+ byteArrayToWordArray ,
2428} from './Utils'
2529export { Registry } from './Registry'
You can’t perform that action at this time.
0 commit comments