jon
ungelesen,28.09.2009, 16:28:4328.09.09Anmelden, um dem Autor zu antworten
Zum Weiterleiten anmelden
Sie sind nicht berechtigt, Nachrichten in dieser Gruppe zu löschen
Anmelden, um die Nachricht zu melden
Originalnachricht anzeigen
Entweder sind die E-Mail-Adressen für diese Gruppe anonym oder Sie benötigen die Berechtigung zum Ansehen der E-Mail-Adressen der Mitglieder, um die Originalnachricht anzusehen
an As3Crypto Discussion List
Hi All,
I'm having some troubles matching the value returned from RSA signing
a Base64 SHA1 hash with the result return in c#.
I'm passing in a Base64 hash decoded as a byte array to the sign()
function provided in as3crypto and base64 encoding the result.
However, this result never matches the returned result from a c#
function which performs the same task. Does it matter that the
function takes in and return hex even though it works at the byte
array level?
Please see my below signing function to check i haven't missed
anything!
private function signHash(hashInBase64:String):String
{
var src:ByteArray = Base64.decodeToByteArray(hashInBase64);
var key:RSAKey = RSAKey.parsePrivateKey(getModulus(), getExponent(),
getPrivate(), getP(), getQ(), getDMP1(), getDMQ1(), getCoeff());
var dst:ByteArray = new ByteArray();
key.sign(src, dst, src.length);
return Base64.encodeByteArray(dst);
}
Any help would be great!!!
Thanks,
Jon