Text that should be kept confidential
The change log is automatically produced with the help of semantic-release.
- The text is stored in an encrypted buffer
- The plain text is only available in a
callback
- Prompting the user for a secure string
secure-string is available for Node.js and the browser. Most modern browsers are supported. If you want to know if your browser is compatible, run the online test suite.
Install with npm
> npm install secure-string --save
const SecureString = require('secure-string')
const password = new SecureString()
password.appendCodePoint(0x41)
password.value(plainText => {
console.log('the passowrd is', plainText.toString())
})
See the spec for more examples.
SecureString.ask
prompts the user for some data
const SecureString = require('secure-string')
SecureString.ask('password', (err, answer) => {
if (err) return console.log(err)
answer.value(plainText => {
console.log('the passowrd is', plainText.toString())
})
})
Include the package from the unpkg CDN
<script src="https://unpkg.com/secure-string/dist/bundle.min"></script>
This creates SecureString
as a global object, or define
it if you are using AMD.
The MIT license.
Copyright © 2017 Richard Schneider ([email protected])