Fenying
open-menu closeme
Home
Articles
Books
Projects
About Me
简体中文 English
  • @litert/[email protected]

    calendar Jun 13, 2024 · 2 min read · typescript encodings base62x base32 javascript  ·
    Share on: twitter facebook linkedin copy

    The buffer-based encoding utility method for node.js.

    Following types of encodings are supported:

    Name Description Binary-Safe
    base64 The standard BASE64 encoding. Yes
    base64url The URL-safe BASE64 encoding. Yes
    base62x The BASE62x encoding. Yes
    base32 The standard BASE32 encoding. Yes
    hex The hexadecimal encoding. Yes
    urlencode The purely URL-safe encoding. Yes
    strict_uri The extended URL-safe encoding. No

    Encoding urlencode

    This is a real urlencode implement, it will escape all bytes as %xx format, excepting A-Z, a-z and 0-9. This is a binary-safe encoding.

    Binary-safe means it could work with binary data perfectly, without gibberish. And it’s all the same below.

    Encoding uri

    This is a simple reference of method encodeURIComponent, so it works as method encodeURIComponent does. And it’s not a binary-safe encoding.

    Encoding strict_uri

    This is based on uri, but all special chars including "-", ".", "_", "!", "*", "(", ")", "~", "'" will be escaped. However, it’s still not a binary-safe encoding.

    NOTE: The data of strict_uri encoding, could be simply decoded by function decodeURIComponent.

    Encoding base64url

    This is based on base64, while charactors "=", "+", "/" will be replaced with URL-safe charactors. This is a binary-safe encoding.

    Encoding base62x

    This is a variation of base64. And it is a binary-safe encoding.

    Installation

    1npm install @litert/encodings@^2.3.0
    

    v2.3.0 CHANGELOG

    • config(deps): updated dependencies.
    • fix(encoding): fixed decoding of the urlencode.
    • build(test): added test cases.
    • build(project): upgraded the minimum version of Node.js to v14.

    Read More
  • @litert/[email protected]

    calendar May 6, 2020 · 1 min read · typescript encodings base62x base32 javascript  ·
    Share on: twitter facebook linkedin copy

    The buffer-based encoding utility method for node.js.

    Following types of encodings are supported:

    Name Description Binary-Safe
    base64 The standard BASE64 encoding. Yes
    base64url The URL-safe BASE64 encoding. Yes
    base62x The BASE62x encoding. Yes
    base32 The standard BASE32 encoding. Yes
    hex The hexadecimal encoding. Yes
    urlencode The purely URL-safe encoding. Yes
    strict_uri The extended URL-safe encoding. No

    Encoding urlencode

    This is a real urlencode implement, it will escape all bytes as %xx format, excepting A-Z, a-z and 0-9. This is a binary-safe encoding.

    Binary-safe means it could work with binary data perfectly, without gibberish. And it’s all the same below.

    Encoding uri

    This is a simple reference of method encodeURIComponent, so it works as method encodeURIComponent does. And it’s not a binary-safe encoding.

    Encoding strict_uri

    This is based on uri, but all special chars including "-", ".", "_", "!", "*", "(", ")", "~", "'" will be escaped. However, it’s still not a binary-safe encoding.

    NOTE: The data of strict_uri encoding, could be simply decoded by function decodeURIComponent.

    Encoding base64url

    This is based on base64, while charactors "=", "+", "/" will be replaced with URL-safe charactors. This is a binary-safe encoding.

    Encoding base62x

    This is a variation of base64. And it is a binary-safe encoding.

    Installation

    1npm install @litert/encodings@^2.2.0
    

    Read More

Fenying

Angus’ Home.
Read More

Recent Posts

  • Why not use socket.write callback in Node.js?
  • Compress virtual machine disks of Hyper-V
  • Disabling the useless features in Windows 11
  • Using private Git repository in Golang
  • Disgusting things during the integration of Apple account login
  • Use OpenCV in NodeJS
  • PKI Tutorials
  • Flush third-party ROM (EvoX) on Xiaomi 12 (cupid)

Categories

TYPESCRIPT 15 OS 6 SOFTWARE 3 CLOUD 2 DOCKER 2 SECURITY 2 GOLANG 1 WEB 1

Tags

TYPESCRIPT 13 NODEJS 12 PKI 11 SSL 11 TLS 11 OPENSSL 10 JAVASCRIPT 9 CERTIFICATES 8 X509 8 CA 7
All Tags
2FA1 ACCOUNT1 AGENT1 ALB1 ALGORITHM1 ANDROID1 APPLE1 ARCHLINUX1 AUTHENTICATION1 AWS2 BACKGROUND1 BASE322 BASE62X2 CA7 CAA1 CDN1 CERTIFICATES8 CLIENT2 CLOUDFLARE1 CLOUDFRONT1 CONNECT1 CONTEXT-MENU1 COOKIES1 CRL1 CUPID1 DATE1 DNS1 DOCKER3 EC3 ECDSA4 ED255192 EDDSA1 ELB1 ENCODINGS2 ERROR1 EXCEL1 EXPLORER1 GIT1 GOLANG1 HYPER-V2 INTERMEDIATE2 JAVASCRIPT9 LINUX2 LOCK-SCREEN1 LOGGER1 LWDFX1 MACHINE1 MENU1 MYSQL1 NETWORK3 NGINX1 NODE1 NODEJS12 OAUTH1 OPENCV1 OPENID1 OPENSSL10 OTP1 PASSWORD2 PICTURE1 PKI11 POWERSHELL1 PRIVATE1 PROTOCOL2 PROXY1 RANDOM1 REDIS2 REVOKE1 RIGHT-CLICK1 ROM1 ROOT1 RPC3 RSA4 RUSTDESK1 SAFE1 SEARCH1 SEED1 SERVER1 SLIDESHOW1 SNOWFLAKE1 SSH1 SSL11 TLS11 TYPE1 TYPESCRIPT13 UUID1 VALIDATION1 VERIFICATION1 VIRTUAL1 VIRTUAL-MACHINE1 WEBSOCKET1 WINDOWS2 WORDPRESS1 X5098 XIAOMI1
[A~Z][0~9]
Angus Fenying

Copyright  ANGUS FENYING, All Rights Reserved. Powered by Hugo, with theme Clarity.

to-top