[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: private/public key support ?
- From: Valerio Schiavoni <valerio.schiavoni@...>
- Date: Wed, 17 Mar 2010 14:36:44 +0100
Hello Luiz,
thanks for the help. Your code is most surely correct.
But this
http://codepad.org/JJcm3J5b
(which should reproduce the sha1-rsa library using bc) is not working
(the decrypted message is not the one I'm expecting to see).
Maybe I cannot use your url2bc to convert any hexadecimal value to
bc's big-int, can i ?
Also, assuming it works, I'm not sure how a reversible operation
(bc2url) is possible.
On Wed, Mar 17, 2010 at 1:45 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> Those hex values represent urls as returned by :
>
> Try this:
>
> require"bc"
>
> function url2bc(url)
> local x=bc.number(0)
> for i=1,#url do
> x=16*x+url:byte(i)
> end
> return x
> end
>
> print(url2bc("http://www.lua.org/"))
>
- References:
- private/public key support ?, Valerio Schiavoni
- Re: private/public key support ?, Valerio Schiavoni
- Re: private/public key support ?, Valerio Schiavoni
- Re: private/public key support ?, Luiz Henrique de Figueiredo
- Re: private/public key support ?, Valerio Schiavoni
- Re: private/public key support ?, Luiz Henrique de Figueiredo
- Re: private/public key support ?, Valerio Schiavoni
- Re: private/public key support ?, Luiz Henrique de Figueiredo
- Re: private/public key support ?, Valerio Schiavoni
- Re: private/public key support ?, Luiz Henrique de Figueiredo