
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Binary-to-text encoding.
Base16 uses hexadecimal characters ("0-9" and "A-F"). Encoding is always uppercase (diverging from Number.prototype.toString and Uint8Array.prototype.toHex, which use lowercase "a-f"), and decoding is case-insensitive.
import { deB16, enB16 } from "@libn/base/b16";
import { assertEquals } from "@std/assert";
const binary = new TextEncoder().encode("Hello :)");
assertEquals(enB16(binary), "48656C6C6F203A29");
assertEquals(deB16("48656C6C6F203A29"), binary);
Base32 uses uppercase letters and digits, excluding "0", "1", "8", and "9". Encoding is always uppercase, and decoding is case-insensitive.
import { deB32, enB32 } from "@libn/base/b32";
import { assertEquals } from "@std/assert";
const binary = new TextEncoder().encode("Hello :)");
assertEquals(enB32(binary), "JBSWY3DPEA5CS");
assertEquals(deB32("JBSWY3DPEA5CS"), binary);
Base32hex uses digits and uppercase letters, excluding "W-Z". Encoding is always uppercase, and decoding is case-insensitive.
import { deH32, enH32 } from "@libn/base/h32";
import { assertEquals } from "@std/assert";
const binary = new TextEncoder().encode("Hello :)");
assertEquals(enH32(binary), "91IMOR3F40T2I");
assertEquals(deH32("91IMOR3F40T2I"), binary);
Crockford base 32 uses digits and uppercase letters, excluding "I", "L", "O", and "U". Encoding is always uppercase, and decoding is case-insensitive, and additionally accepts hyphens (which don't affect the output) and substitutes "I", "L", and "O" characters for their similar-looking numeric counterparts ("1", "1", and "0", respectively).
import { deC32, enC32 } from "@libn/base/c32";
import { assertEquals } from "@std/assert";
const binary = new TextEncoder().encode("Hello :)");
assertEquals(enC32(binary), "91JPRV3F40X2J");
assertEquals(deC32("91JPRV3F40X2J"), binary);
Base58 uses alphanumeric characters, excluding "0", "I", "O", and "l".
import { deB58, enB58 } from "@libn/base/b58";
import { assertEquals } from "@std/assert";
const binary = new TextEncoder().encode("Hello :)");
assertEquals(enB58(binary), "D7LMXYjUZJQ");
assertEquals(deB58("D7LMXYjUZJQ"), binary);
Base64 uses alphanumeric characters and "+" and "/", and "=" for padding.
import { deB64, enB64 } from "@libn/base/b64";
import { assertEquals } from "@std/assert";
const binary = new TextEncoder().encode("Hello :)");
assertEquals(enB64(binary), "SGVsbG8gOik=");
assertEquals(deB64("SGVsbG8gOik="), binary);
Base64url uses alphanumeric characters and "-" and "_". Padding is neither encoded nor decoded.
import { deU64, enU64 } from "@libn/base/u64";
import { assertEquals, assertMatch } from "@std/assert";
const binary = new TextEncoder().encode("Hello :)");
assertEquals(enU64(binary), "SGVsbG8gOik");
assertEquals(deU64("SGVsbG8gOik"), binary);
Z85 uses printable, non-whitespace ASCII characters, excluding '"', "'", ",", ";", "\", "_", "`", "|", and "~". Unlike the original, the binary input length doesn't have to be a multiple of 4, the encoding and decoding functions add and remove padding automatically.
import { deZ85, enZ85 } from "@libn/base/z85";
import { assertEquals, assertMatch } from "@std/assert";
const binary = new TextEncoder().encode("Hello :)");
assertEquals(enZ85(binary), "nm=QNzY?7&");
assertEquals(deZ85("nm=QNzY?7&"), binary);
Ascii85 uses the first 85 printable, non-whitespace ASCII characters, as well as "z" to compress sequences of 4 empty bytes. Unlike the original, the binary input length doesn't have to be a multiple of 4, the encoding and decoding functions add and remove padding automatically.
import { deA85, enA85 } from "@libn/base/a85";
import { assertEquals } from "@std/assert";
const binary = new TextEncoder().encode("Hello :)");
assertEquals(enA85(binary), "87cURD]h(i");
assertEquals(deA85("87cURD]h(i"), binary);
FAQs
Binary-to-text encoding.
We found that @libn/base 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.