Socket
Socket
Sign inDemoInstall

rhash

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rhash

rHash | Data Encryption | by Swôth#9990


Version published
Maintainers
1
Install size
21.8 kB
Created

Readme

Source

rHash® | Data Encryption




Copyright © 2020 | Apache 2.0


Developer / Geliştirici: Swôth#9990




Usage / Kullanım



EN: First we have to define the package.
TR: İlk olarak modülü tanımlamalıyız.
const rHash = require('rhash')

EN: Let's encrypt a text.
TR: Bir metni şifreleyelim.
const rHash = require('rhash')

//You can write whatever you want here.
//Buraya istediğinizi yazabilirsiniz.
const text = "Hello world!"

//If you want to use our ready-made encryption method, type rHash.key("RHS-128") or type your own key.
//Hazır şifreleme yöntemini kullanmak isterseniz rHash.key("RHS-128") yazın veya kendi istediğiniz bir key yazın.
const key = rHash.key("RHS-128") //or const key = "mySuperSecretKey"
const encryptedText = rHash.hash(text, key)
console.log(encryptedText) // Console: 75585151521d4a524f51591c

EN: Use of encryption in login system.
TR: Şifrelemenin giriş sisteminde kullanımı.
const rHash = require('rhash')

const hashedPass = rHash.hash("normalPassword", "superSecretKey")
const formInput = "test123" // invalid password

if (rHash.hash(formInput, "superSecretKey") === hashedPass) {
	console.log("Logged in!")
} else {
	console.log("Invalid Password!")
}

EN: Let's decrypt an encrypted code.
TR: Şifreli bir kodun şifresini çözelim.
const rHash = require('rhash')

//You can write whatever you want here.
//Buraya istediğinizi yazabilirsiniz.
const text = "Hello world!"

//If you want to use our ready-made encryption method, type rHash.key ("RHS-128") or type your own key.
//Hazır şifreleme yöntemini kullanmak isterseniz Hash.key("RHS-128") yazın veya kendi istediğiniz bir key yazın.
const key = rHash.key("RHS-128") //or const key = "mySuperSecretKey"
const encryptedText = rHash.hash(text, key) // this is encrypted code / bu şifrelenmiş kod
console.log(encryptedText) // Console: 75585151521d4a524f51591c

//The key must be the same key used when encrypting!
//Key şifrelerken kullanılan key ile aynı olmalıdır!
const decryptedText = rHash.unhash(encryptedText, key) 

console.log(decryptedText) // Console: Hello world!



Rules / Kurallar



(EN) 1 - The key used for encryption and the key used for decryption must be the same.
(TR) 1 - Şifrelenirken kullanılan anahtar ile çözerken kullanılan anahtar aynı olmalıdır.

(EN) 2 - The text to be encrypted must not contain UTF-8 characters. (Except Turkish characters)
(TR) 2 - Şifrelenecek metin UTF-8 karakterleri içermemelidir. (Türkçe karakterler hariç)

(EN) 3 - Do not share the key you are using, otherwise they may decrypt it.
(TR) 3 - Kullandığınız anahtarı sakın paylaşmayın aksi takdirde şifresini çözebilirler.

(EN) 4 - The key length of ready encryption methods is more than 750.
(TR) 4 - Hazır şifreleme yöntemlerinin anahtarının uzunluğu 750'den fazladır.



Updates / Güncellemeler



0.0.2 ▸ The encryption system has been strengthened!


0.0.1 ▸ Package created and published on NPM




by Swôth#9990 (Apache 2.0)

Keywords

FAQs

Last updated on 04 Nov 2020

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