🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@smithy/util-hex-encoding

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/util-hex-encoding

Converts binary buffers to and from lowercase hexadecimal encoding

4.0.0
latest
Source
npm
Version published
Weekly downloads
27M
1.9%
Maintainers
2
Weekly downloads
 
Created

What is @smithy/util-hex-encoding?

@smithy/util-hex-encoding is a utility package for encoding and decoding hexadecimal strings. It is part of the Smithy framework, which is used for building SDKs and other tools.

What are @smithy/util-hex-encoding's main functionalities?

Hex Encoding

This feature allows you to convert a buffer or byte array into a hexadecimal string.

const { toHex } = require('@smithy/util-hex-encoding');
const buffer = Buffer.from('hello');
const hexString = toHex(buffer);
console.log(hexString); // Output: 68656c6c6f

Hex Decoding

This feature allows you to convert a hexadecimal string back into a buffer or byte array.

const { fromHex } = require('@smithy/util-hex-encoding');
const hexString = '68656c6c6f';
const buffer = fromHex(hexString);
console.log(buffer.toString()); // Output: hello

Other packages similar to @smithy/util-hex-encoding

FAQs

Package last updated on 06 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts