Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajasharan/javascript-bytes
Byte, Hex, Base64 manipulation in javascript
https://github.com/rajasharan/javascript-bytes
Last synced: 3 days ago
JSON representation
Byte, Hex, Base64 manipulation in javascript
- Host: GitHub
- URL: https://github.com/rajasharan/javascript-bytes
- Owner: rajasharan
- License: apache-2.0
- Created: 2014-09-18T00:41:23.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-20T16:54:01.000Z (about 10 years ago)
- Last Synced: 2023-03-12T06:04:03.502Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 125 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Javascript-Bytes
Byte, Hex, Base64 manipulation in pure javascript
## Setup
```
$ npm install
$ bower install
$ grunt serveRunning "connect:server" (connect) task
Started connect web server on http://0.0.0.0:8000Running "watch" task
Waiting...```
## Usage
```js
/*
* open browser console and type
*/
var b = ByteString.decodeHex('48656c6c6f20776f726c64');
console.log(b.data); // [ 72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100 ]
console.log(b.base64()); // SGVsbG8gd29ybGQ=
console.log(b.ascii()); // Hello world
```
Look inside [`app.js`](src/app.js) to see what globals are available on window#### Initial inspiration
* [square/okio](https://github.com/square/okio) library for java/android
* [cryptopals.com](http://cryptopals.com/)