Obtener Numeros Casuales Desde Los File-device "/dev/random" Y "/dev/urandom"


Subject: Obtener Numeros Casuales Desde Los File-device "/dev/random" Y "/dev/urandom"
Hola hermanosss,

podemos conseguir numeros casuales de tipo Byte (los unsigned char del C) leyendo los file-device "/dev/random" y "/dev/urandom".

Ejemplo leyendo el archivo especial "/dev/urandom":

Public Sub Main()

Dim fl As File
Dim b As Byte

fl = Open "/dev/urandom" For Read

While True
Read #fl, b
Write "\r" & b & Space(2)
Sleep 0.3
Wend

End



Referencias:
* http://manpages.ubuntu.com/manpages/vivid/es/man4/random.4.html
* http://man7.org/linux/man-pages/man4/urandom.4.html

Last edited by vuott on Saturday, 31 October 2015, 21:58; edited 3 times in total
Profile PM  
Subject: Re: Obtener Numeros Casuales Desde Los File-device "/dev/random" Y "/dev/urandom"
Buenísimo Vuott, es muy interesante.


Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Design by DiDiDaDo

Generation Time: 0.1036s (PHP: -47% SQL: 147%)
SQL queries: 23 - Debug Off - GZIP Enabled