pike.git/
src/
builtin.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2016-01-17
2016-01-17 01:59:03 by Martin Nilsson <nilsson@fastmail.com>
530fe4634a46b95cc186c08a92880e0b759b2b4d (
10
lines) (+
8
/-
2
)
[
Show
|
Annotate
]
Branch:
8.1
Clean up the types for random_string.
2211:
THIS->handle = NULL; }
-
PIKEFUN string random_string(int
(0..)
len)
+
PIKEFUN string
(8bit)
random_string(int len)
{
-
+
if( len<1 )
+
RETURN empty_pike_string;
if(!crypto_handle) { if( !CryptAcquireContext(&THIS->handle, 0, 0, PROV_RSA_FULL,
2246:
close(THIS->fd); }
-
PIKEFUN string random_string(int
(0..)
len)
+
PIKEFUN string
(8bit)
random_string(int len)
{
-
+
if( len<1 )
+
RETURN empty_pike_string;
+
if( THIS->fd==-1 ) { THIS->fd = open("/dev/urandom", O_RDONLY);