Bitcoin Forum
August 16, 2024, 11:16:04 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Re: Paying to get RSA signing working in Javascript on: May 23, 2011, 09:39:52 AM
The hex that the stringSign function returns should be 512 characters long. If it is any shorter, prepend the number of zeroes that are missing;

something along the lines
Code:
while ( String( hSig ).length < 512 ) hSig = "0" + String( hSig );

should work.
2  Bitcoin / Bitcoin Technical Support / Re: Paying to get RSA signing working in Javascript on: May 23, 2011, 09:23:52 AM
Funny thing, this.
The problem is in the rsa.signString function that returns the hex value of the signature. Javascript incorrectly discards the leading zero (1922282fceed0... instead of 01922282fceed0...) and when you convert this to binary and then base64encode it, naturally, everything goes wrong. With the extra zero, the output is as specified.

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!