Ruby  2.0.0p598(2014-11-13revision48408)
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)); \
void rb_define_singleton_method(VALUE obj, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a singleton method for obj.
Definition: class.c:1501
SSL_METHOD *(* func)(void)
Definition: ossl_ssl.c:108
int argc
Definition: tcltklib.c:1969
const char * name
Definition: nkf.c:208
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Definition: class.c:1348

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, n, NULL, NUM2INT, ossl_raise(), rb_str_new(), RSTRING_PTR, and str.

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, n, 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, n, NULL, NUM2INT, ossl_raise(), rb_str_new(), RSTRING_PTR, and str.

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, str, 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().