Ruby  1.9.3p448(2013-06-27revision41675)
Macros | Functions | Variables
ossl_rand.c File Reference
#include "ossl.h"

Go to the source code of this file.

Macros

#define DEFMETH(class, name, func, argc)
 

Functions

static VALUE ossl_rand_seed (VALUE self, VALUE str)
 
static VALUE ossl_rand_add (VALUE self, VALUE str, VALUE entropy)
 
static VALUE ossl_rand_load_file (VALUE self, VALUE filename)
 
static VALUE ossl_rand_write_file (VALUE self, VALUE filename)
 
static VALUE ossl_rand_bytes (VALUE self, VALUE len)
 
static VALUE ossl_rand_pseudo_bytes (VALUE self, VALUE len)
 
static VALUE ossl_rand_egd (VALUE self, VALUE filename)
 
static VALUE ossl_rand_egd_bytes (VALUE self, VALUE filename, VALUE len)
 
static VALUE ossl_rand_status (VALUE self)
 
void Init_ossl_rand ()
 

Variables

VALUE mRandom
 
VALUE eRandomError
 

Macro Definition Documentation

#define DEFMETH (   class,
  name,
  func,
  argc 
)
Value:
rb_define_method((class), (name), (func), (argc)); \
rb_define_singleton_method((class), (name), (func), (argc));

Definition at line 174 of file ossl_rand.c.

Referenced by Init_ossl_rand().

Function Documentation

void Init_ossl_rand ( void  )
static VALUE ossl_rand_add ( VALUE  self,
VALUE  str,
VALUE  entropy 
)
static

Definition at line 51 of file ossl_rand.c.

References NUM2DBL, RSTRING_LENINT, RSTRING_PTR, and StringValue.

Referenced by Init_ossl_rand().

static VALUE ossl_rand_bytes ( VALUE  self,
VALUE  len 
)
static

Definition at line 96 of file ossl_rand.c.

References eRandomError, NULL, NUM2INT, ossl_raise(), rb_str_new(), and RSTRING_PTR.

Referenced by Init_ossl_rand().

static VALUE ossl_rand_egd ( VALUE  self,
VALUE  filename 
)
static

Definition at line 134 of file ossl_rand.c.

References eRandomError, NULL, ossl_raise(), Qtrue, RSTRING_PTR, and SafeStringValue.

Referenced by Init_ossl_rand().

static VALUE ossl_rand_egd_bytes ( VALUE  self,
VALUE  filename,
VALUE  len 
)
static

Definition at line 150 of file ossl_rand.c.

References eRandomError, NULL, NUM2INT, ossl_raise(), Qtrue, RSTRING_PTR, and SafeStringValue.

Referenced by Init_ossl_rand().

static VALUE ossl_rand_load_file ( VALUE  self,
VALUE  filename 
)
static

Definition at line 65 of file ossl_rand.c.

References eRandomError, NULL, ossl_raise(), Qtrue, RSTRING_PTR, and SafeStringValue.

Referenced by Init_ossl_rand().

static VALUE ossl_rand_pseudo_bytes ( VALUE  self,
VALUE  len 
)
static

Definition at line 115 of file ossl_rand.c.

References eRandomError, NULL, NUM2INT, ossl_raise(), rb_str_new(), and RSTRING_PTR.

Referenced by Init_ossl_rand().

static VALUE ossl_rand_seed ( VALUE  self,
VALUE  str 
)
static

Definition at line 37 of file ossl_rand.c.

References RSTRING_LENINT, RSTRING_PTR, and StringValue.

Referenced by Init_ossl_rand().

static VALUE ossl_rand_status ( VALUE  self)
static

Definition at line 169 of file ossl_rand.c.

References Qfalse, and Qtrue.

Referenced by Init_ossl_rand().

static VALUE ossl_rand_write_file ( VALUE  self,
VALUE  filename 
)
static

Definition at line 81 of file ossl_rand.c.

References eRandomError, NULL, ossl_raise(), Qtrue, RSTRING_PTR, and SafeStringValue.

Referenced by Init_ossl_rand().

Variable Documentation

VALUE eRandomError
VALUE mRandom

Definition at line 16 of file ossl_rand.c.

Referenced by Init_ossl_rand().