Hello,
[EMAIL PROTECTED] wrote on 04/11/2008 03:51:18 AM:
> Dear all,
>
> I need to call the hash function two times, in which the output of the
> first call is used as an input for the second (result = hash[hash(A
> +B) + C]
>
> The first call is ok, but when I concatenate its output to the C,
Hi Marek,
I do the following:
static char *login="login";
static char *password="password";
static char *label="label";
const unsigned char *buf=NULL;
strcat(&buf, login); strcat(&buf, password); strcat(&buf, label);
unsigned char *m1[20];
unsigned char *m2[20];
SHA1(&buf, strlen(&buf), m1); /
Hello,
[EMAIL PROTECTED] wrote on 04/11/2008 03:56:45 PM:
> Hi Marek,
>
> I do the following:
>
> static char *login="login";
> static char *password="password";
> static char *label="label";
>
> const unsigned char *buf=NULL;
> strcat(&buf, login); strcat(&buf, password); strcat(&buf, label);
> From: [EMAIL PROTECTED] On Behalf Of Badra
> Sent: Friday, 11 April, 2008 09:57
> static char *login="login";
> static char *password="password";
> static char *label="label";
>
These could better be pointers to const char, since you shouldn't
and don't try to modify the strings pointed to.
> c
Hi Marek,
> m1 has binary data, not string.
> This data may have embeded 0x00 (look at your output above) and strcat
> can not copy data in good place (to bytes before end instead of end of md1).
> Use memcpy, does not relay of strlen() on such data too.
I check for the output and the inner has
Hi Marek,
I arrived to do inner/outer hash with success.
Next step: store binary result into char static :)
Best regards
On Mon, Apr 14, 2008 at 5:42 PM, Badra <[EMAIL PROTECTED]> wrote:
> Hi Marek,
>
>
>
> > m1 has binary data, not string.
> > This data may have embeded 0x00 (look at your outpu