Skip to content

RyannKim327/Encryption-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Encryption API

By: MPOP Reverse II

A simple encryption api with ascii based program. Just read the documentation to lessen your questions.


Binary

let axios = require("axios");
let encrypt = async (str) => {
	let data = await axios.get("https://api-encryption.vercel.app/binary?data=" + str + "&method=encrypt").then(response => {
		return response.data;
	}).catch(error => {
		console.error("Error: " + error);
		return null;
	});
	return data;
}

let decrypt = async (str) => {
	let data = await axios.get("https://api-encryption.vercel.app/binary?data=" + str + "&method=decrypt").then(response => {
		return response.data;
	}).catch(error => {
		console.error("Error: " + error);
		return null;
	});
	return data;
}

module.exports = async (data) => {
	let enc = await encrypt("a");
	let dec = await decrypt("01100001");
	console.log(enc);
	console.log(dec);
}
Output [Encrypt]:
{
	input: "a",
	method: "encrypt",
	output: "01100001"
}
Output [Decrypt]:
{
	input: "01100001",
	method: "decrypt",
	output: "a"
}

Decimal

let axios = require("axios");
let encrypt = async (str) => {
	let data = await axios.get("https://api-encryption.vercel.app/decimal?data=" + str + "&method=encrypt").then(response => {
		return response.data;
	}).catch(error => {
		console.error("Error: " + error);
		return null;
	});
	return data;
}

let decrypt = async (str) => {
	let data = await axios.get("https://api-encryption.vercel.app/decimal?data=" + str + "&method=decrypt").then(response => {
		return response.data;
	}).catch(error => {
		console.error("Error: " + error);
		return null;
	});
	return data;
}

module.exports = async (data) => {
	let enc = await encrypt("a");
	let dec = await decrypt("97");
	console.log(enc);
	console.log(dec);
}
Output [Encrypt]:
{
	input: "a",
	method: "encrypt",
	output: "97"
}
Output [Decrypt]:
{
	input: "97",
	method: "decrypt",
	output: "a"
}

Hex

let axios = require("axios");
let encrypt = async (str) => {
	let data = await axios.get("https://api-encryption.vercel.app/hex?data=" + str + "&method=encrypt").then(response => {
		return response.data;
	}).catch(error => {
		console.error("Error: " + error);
		return null;
	});
	return data;
}

let decrypt = async (str) => {
	let data = await axios.get("https://api-encryption.vercel.app/hex?data=" + str + "&method=decrypt").then(response => {
		return response.data;
	}).catch(error => {
		console.error("Error: " + error);
		return null;
	});
	return data;
}

module.exports = async (data) => {
	let enc = await encrypt("a");
	let dec = await decrypt("61");
	console.log(enc);
	console.log(dec);
}
Output [Encrypt]:
{
	input: "a",
	method: "encrypt",
	output: "61"
}
Output [Decrypt]:
{
	input: "61",
	method: "decrypt",
	output: "a"
}

Octa

let axios = require("axios");
let encrypt = async (str) => {
	let data = await axios.get("https://api-encryption.vercel.app/octa?data=" + str + "&method=encrypt").then(response => {
		return response.data;
	}).catch(error => {
		console.error("Error: " + error);
		return null;
	});
	return data;
}

let decrypt = async (str) => {
	let data = await axios.get("https://api-encryption.vercel.app/octa?data=" + str + "&method=decrypt").then(response => {
		return response.data;
	}).catch(error => {
		console.error("Error: " + error);
		return null;
	});
	return data;
}

module.exports = async (data) => {
	let enc = await encrypt("a");
	let dec = await decrypt("141");
	console.log(enc);
	console.log(dec);
}
Output [Encrypt]:
{
	input: "a",
	method: "encrypt",
	output: "141"
}
Output [Decrypt]:
{
	input: "141",
	method: "decrypt",
	output: "a"
}

Conclusion

You may insert string data as many as you want, but I still don't know if this api has bugs or none. If you found something, bugs or error, kindly report and email us @ weryses19@gmail.com

About

Binary, Deciman, Hex, Octal Encryptions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published