[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bouncycastle-crypto-dev
Subject:    Re: [dev-crypto] Re: Signatures
From:       "Yasir Khan" <yasir.khan () ascertia ! com>
Date:       2007-06-21 11:01:36
Message-ID: 010401c7b3f3$8940f930$9800a8c0 () ascertia ! com ! pk
[Download RAW message or body]

Hi,

Don't convert signature to string after decoding i.e. don't do the following step:

SigTestString = new String (Base64Util.decode(signature));

instead directly use decoded signature bytes to verify the signature i.e.

verifies = sig.verify(Base64Util.decode(signature));

Regards,
YK
[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.5730.11" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<DIV><FONT size=2>Hi,</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Don't convert signature to string after decoding i.e. don't do 
the following step:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV>SigTestString = new String (Base64Util.decode(signature));</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>instead directly use decoded signature bytes to verify the 
signature i.e.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV>verifies = sig.verify(Base64Util.decode(signature));</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Regards,</FONT></DIV>
<DIV><FONT size=2>YK</FONT></DIV></DIV></BODY></HTML>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic