Click here to Skip to main content
15,886,258 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataContractSerializer objects conversion performace improvement Pin
Ravi Bhavnani3-Mar-14 2:46
professionalRavi Bhavnani3-Mar-14 2:46 
GeneralRe: DataContractSerializer objects conversion performace improvement Pin
impeham5-Mar-14 1:49
impeham5-Mar-14 1:49 
Questionhow to call web api passing multiple parameters in c# Pin
rincy sivan27-Feb-14 0:37
rincy sivan27-Feb-14 0:37 
QuestionRe: how to call web api passing multiple parameters in c# Pin
Richard MacCutchan27-Feb-14 1:31
mveRichard MacCutchan27-Feb-14 1:31 
AnswerRe: how to call web api passing multiple parameters in c# Pin
rincy sivan27-Feb-14 18:36
rincy sivan27-Feb-14 18:36 
GeneralRe: how to call web api passing multiple parameters in c# Pin
Richard MacCutchan27-Feb-14 22:03
mveRichard MacCutchan27-Feb-14 22:03 
QuestionCreate Rsa Signature Pin
upmnemam26-Feb-14 21:50
upmnemam26-Feb-14 21:50 
AnswerRe: Create Rsa Signature Pin
Hessam Jalali1-Mar-14 11:02
Hessam Jalali1-Mar-14 11:02 
RSA keys are in pairs, but you used public key in both methods. replacing provided key in CheckSignature with private key should solve your problem.

and in CheckSignature method you should feed VerifySignature with MD5 hash of key varibale, the code should be more like this

C#
public static byte[] CreateSignature(string key64)
{
    var data = Convert.FromBase64String(key64);

    var rSaCryptoServiceProvider = new RSACryptoServiceProvider(new CspParameters
    {
        Flags = CspProviderFlags.UseMachineKeyStore
    });

    rSaCryptoServiceProvider.FromXmlString(privateKey);


    var RSAform = new RSAPKCS1SignatureFormatter();
    RSAform.SetKey(rSaCryptoServiceProvider);
    RSAform.SetHashAlgorithm("MD5");

    var md5 = MD5.Create();
    byte[] hashData = md5.ComputeHash(data);

    return RSAform.CreateSignature(hashData);
}


hope this helps
QuestionSQL Server project Pin
Lifefor Rent26-Feb-14 19:36
Lifefor Rent26-Feb-14 19:36 
AnswerRe: SQL Server project Pin
OriginalGriff26-Feb-14 20:52
mveOriginalGriff26-Feb-14 20:52 
AnswerRe: SQL Server project Pin
ScottM127-Feb-14 20:53
ScottM127-Feb-14 20:53 
QuestionSystem.Argument Exception Pin
TheJudeDude26-Feb-14 10:26
TheJudeDude26-Feb-14 10:26 
AnswerRe: System.Argument Exception Pin
OriginalGriff26-Feb-14 10:36
mveOriginalGriff26-Feb-14 10:36 
GeneralRe: System.Argument Exception Pin
TheJudeDude26-Feb-14 10:46
TheJudeDude26-Feb-14 10:46 
GeneralRe: System.Argument Exception Pin
phil.o27-Feb-14 0:00
professionalphil.o27-Feb-14 0:00 
QuestionRe: System.Argument Exception Pin
Richard Deeming26-Feb-14 11:25
mveRichard Deeming26-Feb-14 11:25 
AnswerRe: System.Argument Exception Pin
TheJudeDude26-Feb-14 12:01
TheJudeDude26-Feb-14 12:01 
AnswerRe: System.Argument Exception Pin
Richard Andrew x6426-Feb-14 14:11
professionalRichard Andrew x6426-Feb-14 14:11 
GeneralRe: System.Argument Exception Pin
Richard Deeming27-Feb-14 1:28
mveRichard Deeming27-Feb-14 1:28 
AnswerRe: System.Argument Exception Pin
Bernhard Hiller26-Feb-14 21:13
Bernhard Hiller26-Feb-14 21:13 
QuestionMessage Closed Pin
26-Feb-14 10:11
jon15126-Feb-14 10:11 
AnswerMessage Removed PinPopular
26-Feb-14 10:18
mveOriginalGriff26-Feb-14 10:18 
GeneralMessage Removed Pin
26-Feb-14 10:34
jon15126-Feb-14 10:34 
GeneralMessage Removed Pin
26-Feb-14 11:21
mveOriginalGriff26-Feb-14 11:21 
AnswerMessage Removed Pin
26-Feb-14 10:57
jon15126-Feb-14 10:57 

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.