Re: [linux-minidisc] compiling libnetmd and netmdcli on windows
- From: Michael Karcher <Michael.Karcher@fu-berlin.de>
- To: Thomas Arp <manner.moe@gmx.de>
- Date: Wed, 14 Sep 2011 21:41:46 +0200
- Cc: linux-minidisc@lists.fu-berlin.de
- Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows
Am Mittwoch, den 14.09.2011, 09:06 +0200 schrieb Thomas Arp:
> In netmd.cli the random number is used for creating a nonce in this
> way:
> unsigned char hostnonce[8] = { 0 };
> unsigned char *buf;
> uint64_t rand;
> .
> .
> rand = (uint64_t)random();
> buf = hostnonce;
> netmd_copy_quadword_to_buffer(&buf, rand);
> .
> .
>
> As far as i know random() and rand() are 32bit only.
> What about using "gcry_create_nonce(unsigned char *buffer, size_t length)" from libgcrypt instead?
>
> unsigned char hostnonce[8] = { 0 };
> .
> .
> gcry_create_nonce(hostnonce, sizeof(hostnonce));
Yes, go that way. Sounds nice, and we already do depend on libgcrypt.
Regards,
Michael Karcher
- Follow-Ups:
- Re: [linux-minidisc] compiling libnetmd and netmdcli on windows
- From: Thomas Arp <manner.moe@gmx.de>
- Re: [linux-minidisc] compiling libnetmd and netmdcli on windows
- References:
- [linux-minidisc] compiling libnetmd and netmdcli on windows
- From: Thomas Arp <manner.moe@gmx.de>
- Re: [linux-minidisc] compiling libnetmd and netmdcli on windows
- From: Michael Karcher <Michael.Karcher@fu-berlin.de>
- Re: [linux-minidisc] compiling libnetmd and netmdcli on windows
- From: Thomas Arp <manner.moe@gmx.de>
- [linux-minidisc] compiling libnetmd and netmdcli on windows
-
linux-minidisc - September 2011 - Archives indexes sorted by:
[ thread ] [ subject ] [ author ] [ date ] - Complete archive of the linux-minidisc mailing list
- More info on this list...

