
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@hexagon/base64
Advanced tools
The only JavaScript base64 library you will ever need
npm install @hexagon/base64 --save
JavaScript
// ESM Import ...
import base64 from "@hexagon/base64";
// ... or CommonJS Require
const base64 = require("@hexagon/base64");
TypeScript
Note that only default export is available in Node.js TypeScript, as the commonjs module is used internally.
import base64 from "@hexagon/base64";
// ...
JavaScript
import base64 from "https://cdn.jsdelivr.net/gh/hexagon/base64@1/src/base64.js";
// ...
TypeScript
import { base64 } from "https://cdn.jsdelivr.net/gh/hexagon/base64@1/src/base64.js";
// ...
base64.min.js
(UMD and standalone) or base64.min.mjs
(ES-module) from the dist/ folderTo use as a UMD-module (stand alone, RequireJS etc.)
<script src="https://cdn.jsdelivr.net/npm/@hexagon/base64@1/dist/base64.min.js"></script>
To use as a ES-module
<script type="module">
import base64 from "https://cdn.jsdelivr.net/npm/@hexagon/base64@/dist/base64.min.mjs";
// ... see usage section ...
</script>
Full documentation available at hexagon.github.io/base64.
The library encodes and decodes base64/base64url to and from ArrayBuffers
fromArrayBuffer(buffer) - Encodes ArrayBuffer
into base64 string
toArrayBuffer(str) - Decodes base64 string to ArrayBuffer
fromArrayBuffer(buffer, true) - Encodes ArrayBuffer
into base64url string
toArrayBuffer(str, true) - Decodes base64url string to ArrayBuffer
fromString(str) - Encodes String
into base64 string
toString(str) - Decodes base64 string to String
fromString(buffer, true) - Encodes String
into base64url string
toString(str, true) - Decodes base64url string to String
MIT
FAQs
Base64 and base64url to string or arraybuffer, and back. Node, Deno or browser.
We found that @hexagon/base64 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.