[erlang-questions] Password generator in Erlang

Torben Hoffmann torben.lehoff@REDACTED
Fri Aug 17 23:59:53 CEST 2012


Ups, forgot about the addition of the Windows code. As far as my bad memory serves me I think the Windows code does not work. 

And it is /dev/random, not /dev/urandom. 

Must remember to read up on old code before talking about it :-$

___
 /orben
Sent from my iPhone

On 17/08/2012, at 22.44, Zabrane Mickael <zabrane3@REDACTED> wrote:

> Hi Torben,
> 
> On Aug 17, 2012, at 9:33 PM, Torben Hoffmann wrote:
> 
>> One thing to keep in mind with crypto is that it depends on OpenSSL which means that if you want to create a binary version of your application you need to make sure that the execution platform has OpenSSL.
>> 
>> If you are developing a server for your own use - no problem.
> 
> That's the case for us.
> 
>> 
>> If you want to break the dependency you can - on Un*x-like platforms - resort to getting a seed from /dev/urandom - there is an example of this in https://github.com/lehoff/cryptographic, it is ages since I worked on that and I cannot remember the state of that, but the general principle should be sound.
>> 
>> There is a way to do this in Windows too, but we never got around to implementing that back then.
> 
> From the source code:
> /* entropy.c - C code for generating random numbers using the internal windows entropy library. */
> https://github.com/lehoff/cryptographic/blob/master/c_src/entropy.c
> 
> Regards,
> Zabrane
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120817/efa39636/attachment.htm>


More information about the erlang-questions mailing list