On Tue, Feb 1, 2011 at 5:36 PM, hlcborg <h.luis.cardoso@gmail.com> wrote:
> encode(hmac(v_em_crt_conc, v_Private,'sha1'),'base64');
HMAC - key-dependant SHA1
> The Result:
>
> h6CpmrP1QCE/Mp3xn3utUEPtftg= This hash has 28 chars
>
> When I use OpenSSL in command line like this:
>
> ~$ echo "2011-01-31;2011-02-01T13:33:38;100036;684.40; " | openssl dgst
> -sha1 -sign abc.pem | openssl enc -base64 -A
Plain SHA1, which is signed with RSA signature.
> The Result is:
>
>
nKfxnt31+kk/RnKihJ0jKufq+nZvmPjVauGo8+tqJ1Y/ah/mAu4jSS1wnzU+wRygZ4CLIV9DGSs9bxBc4r9e71C8s9B5ms6Kpggmc12kdmqVHBRO28bPWb/YLCej59gZFFkvcCudweNAT4qHvVqWsOtFCf9kE4q92UIv1JcwSDU=
>
> This hash has 172 chars
>
> Does someone know where is my problem? Is there other way to implement? or
> is it simply impossible??
These two operations are not equivalent.
--
marko