Code Monkey home page Code Monkey logo

radix64's Introduction

radix64

Build Status

radix64 is a JS Library which allow to transform an unsigned Integer into a string with the same characteres as base64URL. It allow to compress the number into a smaller string which doesn't need to be URLEncoded The default behavior is to encode using Base64URL, as defined in rfc 4648

##Basic Usage

var radix64 = require('radix64').radix64 ;
console.log(radix64( +new Date()));

###Options Several mapping option is available

  • base64 : respect base64 charactere map from rfc 4648.
  • base64URL : default option. The output can safely be use in URLs without beeing url encoded.
  • base64Natural : follow a more natural order of mapping, begining the same way a Hexadecimal.
  • base64Ascii : same caractere as base64URL, but order in the ascii code order. It allows comparaison of output of the same length.

###Usage with Options

var radix64 = require('radix64') ;
console.log(radix64.radix64( +new Date()) , radix64.methods.BASE64URL );

##ASCII64 The base64Ascii method allows to compare output from same length, but doesn't work for output of differents length. The Ascii64 methods aims to solve this problem, by adding padding to the output ###Sample

var ascii64 = require('radix64').ascii64 ;
assert.ok ( ascii(65) > ascii(63));

radix64's People

Contributors

maxired avatar

Stargazers

 avatar Florian Traverse avatar Simon Lopez avatar

Watchers

James Cloos avatar  avatar

Forkers

dwsyoyo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.