1.1.4 • Published 4 years ago

ascii-encoding v1.1.4

Weekly downloads
5
License
MIT
Repository
-
Last release
4 years ago

ascii-encoding

This package will be used to encode or decode binary or hexadecimal code to ascii encoding or from the ascii encoding

Contact me

If you have any questions do not hesitate to join me on my discord server

API

  • encode.hexaToASCII()
  • encode.binaryToASCII()
  • decode.ASCII_To_Hexa()
  • decode.ASCII_To_Binary()

Decode the ASCII encoding to the hexadecimal code

const { decode } = require('ascii-encoding');
const csl = console.log;

csl(decode.ASCII_To_Hexa('the house')); /* () => Do not translate, the hexadecimal code we get will be just for "the house"
                                            * () => "74686520686f757365" */

Encode the hexadecimal code to the ASCII encoding

const { encode } = require('ascii-encoding');
let x = '74686520686f757365';

console.log(encode.hexaToASCII(x)); /* () => Again, do not translate else it will not be worth anything anymore 
                                        * () => "the house" */

Decode the ASCII encoding to binary code

const { decode } = require('ascii-encoding');
let x = "the house";

console.log(decode.ASCII_To_Binary(x)); /* () => "0111010001101000011001010110100001101111011101010111001101100101" */

Obsolete method (for encode the binary code to the ASCII encoding)

const { encode } = require('ascii-encoding');
let x = "0111010001101000011001010110100001101111011101010111001101100101"; /* () => Do not put space in the binary code */

console.log(encode.binaryToASCII(x)); /* () => "thehout\u0000" */

MIT License

Copyright (c) 2019 wazabix

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.1.4

4 years ago

1.1.3

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago