Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ar-aes

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ar-aes

传输加密,AES对称加密

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

使用说明

安装

npm install ar-aes

uniapp使用

1.main.js引入js文件注册.当然也可以哪里需要哪里引入

import AES from 'ar-aes'
Vue.prototype.AES = AES.AES

2.页面调用

//加密值
let e = this.AES.encrypt('123','1234567891234567','1234567891234567')

//解密值
this.AES.decrypt(e,'1234567891234567','1234567891234567')

通用方式

1.JS文件引入

var AES = require("ar-aes");

2.页面调用

//加密值
let e = AES.AES.encrypt('123','1234567891234567','1234567891234567')

//解密值
AES.AES.decrypt(e,'1234567891234567','1234567891234567')

encrypt

加密字符串,返回加密后的字符串

参数说明类型
valueString加密字符串String
key加密密码KEY,16位String
iv偏移量IV,16位String
返回值返回加密后的字符串String

decrypt

加密字符串,返回加密后的字符串

参数说明类型
valueString解密字符串String
key加密密码KEY,16位String
iv偏移量IV,16位String
返回值返回解密后的字符串,解密失败返回空字符串string 或 ''

Keywords

FAQs

Package last updated on 01 Jan 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc