Socket
Socket
Sign inDemoInstall

ansible-vault

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ansible-vault

An ansible vault compatible en- and decryption library for javascript


Version published
Weekly downloads
1.9K
decreased by-4.48%
Maintainers
1
Install size
20.2 kB
Created
Weekly downloads
 

Readme

Source

NPM version npm Build Status

ansible-vault

An Ansible vault compatible en- and decryption library for javascript

usage

encrypt

const { Vault } = require('ansible-vault')

const v = new Vault({ password: 'pa$$w0rd' })
v.encrypt('superSecret123').then(console.log)
//> $ANSIBLE_VAULT;1.1;AES256
//> 33383239333036363833303565653032383832663162356533343630623030613133623032636566
//> 6536303436646561356461623866386133623462383832620a646363626137626635353462386430
//> 34333937313366383038346135656563316236313139333933383139376333353266666436316536
//> 6335376265313432610a313537363637383264646261303637646631346137393964386432313633
//> 3666

// or for synchronous operation
const vault = v.encryptSync('superSecret123')

decrypt

const { Vault } = require('ansible-vault')

const vault = `$ANSIBLE_VAULT;1.1;AES256
33383239333036363833303565653032383832663162356533343630623030613133623032636566
6536303436646561356461623866386133623462383832620a646363626137626635353462386430
34333937313366383038346135656563316236313139333933383139376333353266666436316536
6335376265313432610a313537363637383264646261303637646631346137393964386432313633
3666`

const v = new Vault({ password: 'pa$$w0rd' })
v.decrypt(vault).then(console.log)
//> superSecret123

// or for synchronous operation
const secret = v.decryptSync(vault)

license

MIT Licensed

references

Ansible® is a registered trademark of RedHat® (I hope this is correct...)

Keywords

FAQs

Last updated on 29 Sep 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc