Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/simple_utility/src/text.ts>hexEncode

Useful snippet collection.
Go to Latest
function hexEncode
import { hexEncode } from "https://deno.land/x/simple_utility@v0.5.2/src/text.ts";

Convert from binary to hex string.

Examples

Example 1

const bin = await Deno.readFile("./file");
const converted = hexEncode(bin);
const restored = hexDecode(converted);

Parameters

data: Uint8Array

Returns

string