ext/openssl/ossl_rand.c File Reference

#include "ossl.h"

Go to the source code of this file.

Defines

#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


Define 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   ) 

Definition at line 182 of file ossl_rand.c.

References DEFMETH, eOSSLError, eRandomError, mOSSL, mRandom, ossl_rand_add(), ossl_rand_bytes(), ossl_rand_egd(), ossl_rand_egd_bytes(), ossl_rand_load_file(), ossl_rand_pseudo_bytes(), ossl_rand_seed(), ossl_rand_status(), ossl_rand_write_file(), rb_define_class_under(), rb_define_module(), and rb_define_module_under().

Referenced by Init_openssl().

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(), RSTRING_PTR, and VALUE.

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(), RSTRING_PTR, and VALUE.

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

Definition at line 17 of file ossl_rand.c.

Referenced by Init_ossl_rand(), ossl_rand_bytes(), ossl_rand_egd(), ossl_rand_egd_bytes(), ossl_rand_load_file(), ossl_rand_pseudo_bytes(), and ossl_rand_write_file().

VALUE mRandom

Definition at line 16 of file ossl_rand.c.

Referenced by Init_ossl_rand().


Generated on 19 Jul 2016 for Ruby by  doxygen 1.4.7