Click here to Skip to main content
15,888,301 members
Home / Discussions / C#
   

C#

 
AnswerRe: generics with nullable value Pin
Guffa10-Sep-08 11:13
Guffa10-Sep-08 11:13 
Questionlocalization and Globalization but in other way Pin
rahuladya10-Sep-08 7:55
rahuladya10-Sep-08 7:55 
AnswerRe: localization and Globalization but in other way Pin
User 665810-Sep-08 8:09
User 665810-Sep-08 8:09 
GeneralRe: localization and Globalization but in other way Pin
rahuladya10-Sep-08 8:25
rahuladya10-Sep-08 8:25 
GeneralRe: localization and Globalization but in other way Pin
User 665810-Sep-08 8:30
User 665810-Sep-08 8:30 
GeneralRe: localization and Globalization but in other way Pin
Pete O'Hanlon10-Sep-08 9:05
mvePete O'Hanlon10-Sep-08 9:05 
GeneralRe: localization and Globalization but in other way Pin
rahuladya10-Sep-08 9:37
rahuladya10-Sep-08 9:37 
QuestioncryptoAPI for Assymetric type Pin
Suresh Ramasamy10-Sep-08 7:32
Suresh Ramasamy10-Sep-08 7:32 
i tried with cryptEncypt and cryptDecrypt function. Below are the key function which i used to get the publc and private key from certificate

Please check my code.. it not working (its in c# .net)

// create 128 bit hash object
if (!WinApi.CryptCreateHash(hProv,
WinApi.CALG_MD5, IntPtr.Zero, 0, ref hHash))
Failed("CryptCreateHash");

// add passphrase to hash
byte[] keyData = ASCIIEncoding.ASCII.GetBytes(passphrase);
if (!WinApi.CryptHashData(hHash, keyData, (uint)keyData.Length, 0))
Failed("CryptHashData");

// create 40 bit crypto key from passphrase hash
// if (!WinApi.CryptDeriveKey(hProv, WinApi.CALG_RC2,
// hHash, WinApi.CRYPT_EXPORTABLE, ref hKey))
// Failed("CryptDeriveKey");

// Generate new key pair
//WinApi.CryptImportKey(hProv, keyData, (uint)keyData.Length, 0, 0, ref hProv);

// Get a handle to the key exchange key.
if (!WinApi.CryptGetUserKey(hProv, 1, ref hProv))
{
uint dwResult = WinApi.GetLastError();
// printf("Error %x during CryptGetUserKey!\n", GetLastError());
//goto done;
}




if (!WinApi.CryptImportKey(hProv, keyData, (uint)keyData.Length, 0, 0, ref hProv))
{
uint dwResult = WinApi.GetLastError();

}
if (!WinApi.CryptGenKey(hProv, WinApi.CALG_RC2, WinApi.CRYPT_EXPORTABLE, ref hKey))
{
uint dwResult = WinApi.GetLastError();
//MessageBox("Error CryptGenKey() failed.", "Information", MB_OK);
// return;
}



// if (!WinApi.CryptGenKey(hProv, WinApi.CALG_RC2, WinApi.CRYPT_EXPORTABLE, ref hKey))
// {
// Failed("CryptGenKey");
// }
AnswerRe: cryptoAPI for Assymetric type Pin
led mike10-Sep-08 11:09
led mike10-Sep-08 11:09 
QuestionRemoting : Server calling another [modified] Pin
MrEyes10-Sep-08 6:52
MrEyes10-Sep-08 6:52 
GeneralRe: Remoting : Server calling another Pin
Rutvik Dave10-Sep-08 10:07
professionalRutvik Dave10-Sep-08 10:07 
AnswerRe: Remoting : Server calling another Pin
Pete O'Hanlon10-Sep-08 10:13
mvePete O'Hanlon10-Sep-08 10:13 
GeneralRe: Remoting : Server calling another Pin
MrEyes12-Sep-08 2:31
MrEyes12-Sep-08 2:31 
QuestionRSACryptoServiceProvider asymmetric error Pin
Suresh Ramasamy10-Sep-08 5:26
Suresh Ramasamy10-Sep-08 5:26 
AnswerRe: RSACryptoServiceProvider asymmetric error Pin
Mbah Dhaim10-Sep-08 8:38
Mbah Dhaim10-Sep-08 8:38 
QuestionStrange List<string> sorting request</string> Pin
Vodstok10-Sep-08 4:44
Vodstok10-Sep-08 4:44 
AnswerRe: Strange List sorting request Pin
Ennis Ray Lynch, Jr.10-Sep-08 5:08
Ennis Ray Lynch, Jr.10-Sep-08 5:08 
AnswerRe: Strange List sorting request Pin
Guffa10-Sep-08 5:19
Guffa10-Sep-08 5:19 
GeneralRe: Strange List sorting request Pin
Vodstok10-Sep-08 5:28
Vodstok10-Sep-08 5:28 
GeneralRe: Strange List sorting request Pin
Mbah Dhaim10-Sep-08 7:59
Mbah Dhaim10-Sep-08 7:59 
QuestionHow can I built an XmlDocument from scratch and then validate it? Pin
JNeave10-Sep-08 4:43
JNeave10-Sep-08 4:43 
AnswerRe: How can I built an XmlDocument from scratch and then validate it? Pin
Monark10-Sep-08 14:19
Monark10-Sep-08 14:19 
QuestionThraed time ! Pin
Mohammad Dayyan10-Sep-08 4:39
Mohammad Dayyan10-Sep-08 4:39 
AnswerRe: Thraed time ! Pin
JNeave10-Sep-08 4:54
JNeave10-Sep-08 4:54 
AnswerRe: Thraed time ! Pin
leppie10-Sep-08 4:56
leppie10-Sep-08 4:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.