New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

security-service

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

security-service

Security Service

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

NPM

Build Status

#Security Service

$ git clone https://github.com/LeoYehTW/security-service.git
$ npm install
$ node example.js

Sample Code:

var security_service = require('security-service');
  
// Token
var data = security_service.token('sha256',data)
console.log(data);
//9f191b3167af0649edeb8888946bee1c523b87aff6219fa7765ac731bca74fb1
  
// Encrypt
var data = security_service.encrypt('HS512',"key","1234567890");
console.log(data);
// eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.IjEyMzQ1Njc4OTAi.bW_OZ2T97O7Uuf9DquavbdPEUydARvmDEYYho2bvWmXF3QELZM4O3nG32OR-DNQxcPO_xzqqYMfHRDLajuvHEg

  
// Decrypt
var data = security_service.decrypt('HS512',"key",data);
console.log(data);
// 1234567890
  

Installation

$ npm install security-service

Install dependencies:

$ npm install

General Functions

  • Token
  • Encrypt
  • Decrypt

Support

  • Token: MD5
  • Token: SHA1
  • Token: SHA256
  • Encrypt/Decrypt: AES256
  • Encrypt/Decrypt: HS512
  • Encrypt/Decrypt: RS256

Contributors

License

MIT

Keywords

security

FAQs

Package last updated on 18 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts