项目作者: mmeyer2k

项目描述 :
:herb: Bulletproof symmetric encryption library for .NET
高级语言: C#
项目地址: git://github.com/mmeyer2k/harpocrates.git
创建时间: 2019-05-13T06:51:15Z
项目社区:https://github.com/mmeyer2k/harpocrates

开源协议:MIT License

下载


:herb: Harpocrates

Bulletproof symmetric encryption library for .NET Framework.
Many of the .NET encryption code examples found online are deeply flawed.
Harpocrates protects your data by protecting you from yourself.

(Ancient Greek: Ἁρποκράτης) was the god of silence, secrets and confidentiality in the Hellenistic religion.

Install

Using the nuget package manager…

  1. PM> Install-Package Harpocrates -Version 1.1.0

or download the latest DLL (1.1.0) and import into your project.

Features

  • The most secure options are chosen by default
  • Separate key derivation for HMAC and AES
  • Message authenticity is verified before decryption by comparing SHA-256 hashes
  • Uses strongly random initialization vectors
  • Configurable key hardening to prevent brute force attacks

Using Harpocrates

  1. string encrypted = Harpocrates.Engine.Encrypt("secret!", "password");
  2. string plaintext = Harpocrates.Engine.Decrypt(encrypted, "password");

Hardening the password with PBKDF2 helps prevent brute force attacks.
Pass a third parameter to specify the number of iterations.

  1. string encrypted = Harpocrates.Engine.Encrypt("secret!", "password", 10000);
  2. string plaintext = Harpocrates.Engine.Decrypt(encrypted, "password", 10000);