jon
unread,Sep 28, 2009, 4:28:43 PM9/28/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 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