salted-sha512

1.0.6 • Public • Published

Salted SHA512

NPM Downloads

Description

Salted SHA512 hash. Use salt to increase decrypt (unhash) resistance.

Installation

npm install salted-sha512

Initialization

// Import.
const saltedSha512 = require('salted-sha512');

Using

// Get salted SHA512.
const saltedHash = saltedSha512('Some data.', 'SUPER-S@LT!');
// Value of "saltedHash": "f565a8fbe0b1b3d36427a3b7e0f0d3d9397f207061785211a0078108773990a0cf501a7bb46fc206e7765b17dc8cafb4c09db45e76a3be81e76828e471b7d45b".

// Get salted SHA512 async (as promise). Just set "isAsync" param as "true".
const saltedHashAsync = await saltedSha512('Some data.', 'SUPER-S@LT!', true);
// Value of "saltedHashAsync": "f565a8fbe0b1b3d36427a3b7e0f0d3d9397f207061785211a0078108773990a0cf501a7bb46fc206e7765b17dc8cafb4c09db45e76a3be81e76828e471b7d45b".

License

The MIT License (MIT)

Copyright © 2019 - 2023 Volodymyr Sichka

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Readme

Keywords

Package Sidebar

Install

npm i salted-sha512

Weekly Downloads

189

Version

1.0.6

License

MIT

Unpacked Size

8.11 kB

Total Files

6

Last publish

Collaborators

  • volodymyr.sichka