Skip to content

Latest commit

 

History

History
34 lines (17 loc) · 561 Bytes

README.md

File metadata and controls

34 lines (17 loc) · 561 Bytes

Usage

import Encoding from '@markssl/encoding'

API

base64ToHex(b64: string): string

Converts a base64 string to a hex string.

bufToBase64(u8: Uint8Array): string

Converts a Uint8Array to a base64 string.

bufToHex(u8: Uint8Array): string

Converts a Uint8Array to a hex string.

hexToBuf(hex: string): Uint8Array

Converts a hex string to a Uint8Array.

numToHex(d: number): string

Converts a number to a hex string.

utf8ToHex(str: string): string

Converts a UTF-8 string to a hex string.