-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: LovedJohnySmith
Message 2 in Discussion
Pradeep,
Please use the following code snippet in your Encryption Block.
public string EncryptDet(string strSample, string strPass){
int intStart = intCnt % strPass.Length;
lngChr = Convert.ToInt64(strSample.Substring(intCnt,1)[0]); // [0] for to avoid
"" from the input, e.g., "S" ==> 'S'
// To avoid index is not found exception
if(intStart == (strPass.Length -1))
lngChr = lngChr + Convert.ToInt64(strPass.Substring(intStart,1)[0]); // [0] for
to avoid "" from the input, e.g., "S" ==> 'S'
else
lngChr = lngChr + Convert.ToInt64(strPass.Substring(intStart+1,1)[0]); // [0]
for to avoid "" from the input, e.g., "S" ==> 'S'
strBuff = strBuff + (char)(lngChr & Convert.ToInt64("0xFF", 16));// AND wif
0xFF
see the code snippet for implementation.
Encrypt64.Encryption64 obj = new Encrypt64.Encryption64();
obj.EncryptDet("data source=<Your Server>;initial catalog=<Your
Database>;uid=sa","Password")
those lines, produce the following format...
<appSettings>
<add key="ConnectionString"
value="��ǰf��Ŀ������{�t��}~����¸����t���������� �����¼��ǵ" />
</appSettings>
If you wanna, decrypt this connection string, you just decrement the counter in
encryption method, say., note., here strBuff - (char) (lngChr &
Convert.ToInt64("0XFF", 16))
strBuff = strBuff - (char)(lngChr & Convert.ToInt64("0xFF", 16));// AND wif
0xFF
Before, Opening to connection., get connection string from Decrypt method as
following code snippet.
Encryption64 objEncrypt = new Encryption64();
strConnectionString =
objEncrypt.DecryptDet(ConfigurationSettings.AppSettings["ConnectionString"],"Password");
now., you can get your connection string and open your connection using the
decrypted one.
I hope, it will clear, pls lemmi noe., if you have not clear.
Thanx,
Smith
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]