You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

array-buffer-to-hex

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-buffer-to-hex

Turn an `ArrayBuffer` into a string of hexadecimal characters.

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

array-buffer-to-hex

Turn an ArrayBuffer into a string of hexadecimal characters.

Installation

npm install --save array-buffer-to-hex

Usage

const arrayBufferToHex = require('array-buffer-to-hex')

const randomData = crypto.getRandomValues(new Uint8Array(16)).buffer

const string = arrayBufferToHex(randomData)

console.log(string)
//=> "a2c57b9bc22056336ce5a3ec917819e0"

API

arrayBufferToHex(arrayBuffer: ArrayBuffer) => string

Returns a new string with the hexadecimal content from the array buffer.

Keywords

ArrayBuffer

FAQs

Package last updated on 19 Oct 2017

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