dothemagic

Looking for a Library that Encrypts and Decrypts your data or strings on the fly and that is not easily detectable by hackers , Then you are at correct place.

$10/mo

1.2K downloads
secureinfo-corp

dothemagic

Looking for a Library that Encrypts and Decrypts your data or strings on the fly and that is not easily detectable by hackers , Then you are at correct place.

dothemagic Library encrypts/Decrypts your data using the best AES encryption and unlike usual libraries dothemagic don't use hard coded encryption/decryption keys , you can provide the secure URL of your private key(AES encrypted with key "invisibleit") located in cloud storage and dothemagic will fetch it and it will make use of it.

Installation

After obtaining the license of the Library ,you can install it by following the below steps:-

Step 1: $ npm login --registry https://r.privjs.com

and enter username, password

Step 2: $ npm install dothemagic --registry https://r.privjs.com

That’s all. If the user has access to the package it would proceed with the installation. Otherwise, PrivJs would not allow the installation to proceed.

Usage/Examples (Angular 2+ users)

angular.module('myApp').controller('MyController', ['MagicService', function (MagicService) {
  const vm = this;

  vm.userString = '';
  vm.encryptedData = '';
  vm.decryptedData = '';

  vm.encryptData = async function () {
    vm.encryptedData = await MagicService.encrypt(vm.userString);
  };

  vm.decryptData = async function () {
    vm.decryptedData = await MagicService.decrypt(vm.encryptedData);
  };
}]);

Usage (Node.js)

For Node.js users:-

After completing the Installtaion steps , include library as follows:-

const myPackage = require('dothemagic');

and use it check the below demo:-

Usage/Examples

async function test()
{
url='enter yoursecure cloud storage url';

var test=await myPackage.Fidelius("hello",url);



console.log(test);

var test2=await myPackage.Aparecium(test,url);
console.log(test2);

}
test()

Usage (React.js/Vue.js)

For React.js/Vue.js users:-

After completing the Installtaion steps , include library as follows:-

import { Fidelius, Aparecium } from 'dothemagic';

and use it check the below demo:-

Usage/Examples

<template>
  <div>
    <button @click="encryptData">Encrypt</button>
    <button @click="decryptData">Decrypt</button>
    <div v-if="encryptedData">{{ encryptedData }}</div>
    <div v-if="decryptedData">{{ decryptedData }}</div>
  </div>
</template>

<script>
import { Fidelius, Aparecium } from 'dothemagic';

export default {
  data() {
    return {
      userString: 'Hello, world!',
      encryptedData: '',
      decryptedData: '',
    };
  },
  methods: {
    async encryptData() {
      this.encryptedData = await Fidelius(this.userString,url);
    },
    async decryptData() {
      this.decryptedData = await Aparecium(this.encryptedData,url);
    },
  },
};
</script>

Monetize your
open-source work

Supercharge your OSS projects by selling npm packages. Get started in just 5 minutes.