Ruby  2.4.2p198(2017-09-14revision59899)
Functions | Variables
ossl_rand.c File Reference
#include "ossl.h"
Include dependency graph for ossl_rand.c:

Go to the source code of this file.

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_status (VALUE self)
 
void Init_ossl_rand (void)
 

Variables

VALUE mRandom
 
VALUE eRandomError
 

Function Documentation

◆ Init_ossl_rand()

void Init_ossl_rand ( void  )

◆ ossl_rand_add()

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

Definition at line 53 of file ossl_rand.c.

References NUM2DBL, RSTRING_LENINT, RSTRING_PTR, and StringValue.

Referenced by Init_ossl_rand().

◆ ossl_rand_bytes()

static VALUE ossl_rand_bytes ( VALUE  self,
VALUE  len 
)
static

◆ ossl_rand_load_file()

static VALUE ossl_rand_load_file ( VALUE  self,
VALUE  filename 
)
static

Definition at line 68 of file ossl_rand.c.

References eRandomError, NULL, ossl_raise(), Qtrue, rb_check_safe_obj(), and StringValueCStr.

Referenced by Init_ossl_rand().

◆ ossl_rand_seed()

static VALUE ossl_rand_seed ( VALUE  self,
VALUE  str 
)
static

Definition at line 22 of file ossl_rand.c.

References RSTRING_LENINT, RSTRING_PTR, and StringValue.

Referenced by Init_ossl_rand().

◆ ossl_rand_status()

static VALUE ossl_rand_status ( VALUE  self)
static

Definition at line 205 of file ossl_rand.c.

References Qfalse, and Qtrue.

Referenced by Init_ossl_rand().

◆ ossl_rand_write_file()

static VALUE ossl_rand_write_file ( VALUE  self,
VALUE  filename 
)
static

Definition at line 87 of file ossl_rand.c.

References eRandomError, NULL, ossl_raise(), Qtrue, rb_check_safe_obj(), and StringValueCStr.

Referenced by Init_ossl_rand().

Variable Documentation

◆ eRandomError

VALUE eRandomError

◆ mRandom

VALUE mRandom

Definition at line 12 of file ossl_rand.c.

Referenced by Init_ossl_rand().