Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 11th November 2011
Braincode's Avatar
Braincode Braincode is offline
Ceriwis Addicted
 
Join Date: Nov 2011
Posts: 4,638
Rep Power: 20
Braincode mempunyai hidup yang Normal
Default Free License Component Untuk Encrypt Koneksi Database di App.config atau Web.Config





CipherLite.NET� can be used to encrypt and decrypt database connection strings and other sensitive .NET application settings stored in configuration (.config) files. In addition to encryption, CipherLite.NET� provides facilities for hashing data and verifying data hashes.



How does it work?



CipherLite.NET� comes with a GUI tool allowing application administrators to encrypt application settings (the tool can also be used to decrypt data). Once encrypted, application settings can be stored in the application configuration files (Windows� registry or other storage media). Applications can retrieve encrypted values from the configuration files and decrypt them with the help of the CipherLite.NET� library.



In addition to encryption and decryption, CipherLite.NET� offers a capability to generate password (and other) hashes, which can be used for user authentication or other purposes.



Technology



CipherLite.NET� is a .NET application. It encrypts and decrypts data using the Rijndael (AES) symmetric key algorithm, as well as DPAPI. The product supports several hashing algorithms including MD5, SHA-1, SHA-256, SHA-384, SHA-512, HMAC SHA-1, and others.



Sample Penggunaan :



C#




Code:

//
// C# example
//
using System.Configuration;
using Obviex.CipherLite;
...
try
{
// Get base64-encoded ciphertext value.
string configValue;
configValue = ConfigurationSettings.AppSettings["DB"];

// Convert base64-encoded value to byte array.
byte[] cipherText;
cipherText = Encoder.Base64Decode(configValue);

// Decrypt value using DPAPI.
string connString;
connString= Dpapi.Decrypt(cipherText);

// Use decrypted connection string.
...
}
catch (Exception ex)
{
// Process exception.
}

VB.Net




Code:

Imports System.Configuration
Imports Obviex.CipherLite
...
Try
' Get base64-encoded ciphertext value.
Dim configValue As String
configValue = ConfigurationSettings.AppSettings("DB")

' Convert base64-encoded value to byte array.
Dim cipherText As Byte()
cipherText = Encoder.Base64Decode(configValue)

' Decrypt value using DPAPI.
Dim connString As String
connString= Dpapi.Decrypt(cipherText)

' Use decrypted connection string.
...
Catch ex As Exception
' Process exception.
End Try



Mampir Lapak Saya



Butuh Kerjaan Freelance Buat Bertahan Hidup di Jakarta



Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 06:52 AM.


no new posts