Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "ossl.h"
Go to the source code of this file.
Macros | |
#define | NewBN(klass) TypedData_Wrap_Struct((klass), &ossl_bn_type, 0) |
#define | SetBN(obj, bn) |
#define | GetBN(obj, bn) |
#define | SafeGetBN(obj, bn) |
#define | BIGNUM_BOOL1(func) |
#define | BIGNUM_1c(func) |
#define | BIGNUM_2(func) |
#define | BIGNUM_2c(func) |
#define | BIGNUM_3c(func) |
#define | BIGNUM_BIT(func) |
#define | BIGNUM_SHIFT(func) |
#define | BIGNUM_SELF_SHIFT(func) |
#define | BIGNUM_RAND(func) |
#define | BIGNUM_RAND_RANGE(func) |
#define | BIGNUM_NUM(func) |
#define | BIGNUM_CMP(func) |
Variables | |
static const rb_data_type_t | ossl_bn_type |
VALUE | cBN |
VALUE | eBNError |
BN_CTX * | ossl_bn_ctx |
#define BIGNUM_1c | ( | func | ) |
#define BIGNUM_2 | ( | func | ) |
#define BIGNUM_2c | ( | func | ) |
#define BIGNUM_3c | ( | func | ) |
#define BIGNUM_BIT | ( | func | ) |
#define BIGNUM_BOOL1 | ( | func | ) |
#define BIGNUM_CMP | ( | func | ) |
#define BIGNUM_NUM | ( | func | ) |
#define BIGNUM_RAND | ( | func | ) |
#define BIGNUM_RAND_RANGE | ( | func | ) |
#define BIGNUM_SELF_SHIFT | ( | func | ) |
#define BIGNUM_SHIFT | ( | func | ) |
#define GetBN | ( | obj, | |
bn | |||
) |
Definition at line 22 of file ossl_bn.c.
Referenced by BIGNUM_1c(), BIGNUM_3c(), ossl_bn_copy(), ossl_bn_eq(), ossl_bn_eql(), ossl_bn_hash(), ossl_bn_initialize(), ossl_bn_is_prime(), ossl_bn_is_prime_fasttest(), ossl_bn_to_i(), ossl_bn_to_s(), and ossl_bn_value_ptr().
#define NewBN | ( | klass | ) | TypedData_Wrap_Struct((klass), &ossl_bn_type, 0) |
Definition at line 13 of file ossl_bn.c.
Referenced by BIGNUM_1c(), ossl_bn_alloc(), ossl_bn_new(), ossl_bn_s_generate_prime(), and try_convert_to_bn().
#define SafeGetBN | ( | obj, | |
bn | |||
) |
#define SetBN | ( | obj, | |
bn | |||
) |
Definition at line 15 of file ossl_bn.c.
Referenced by BIGNUM_1c(), ossl_bn_alloc(), ossl_bn_new(), ossl_bn_s_generate_prime(), and try_convert_to_bn().
BIGNUM_1c | ( | sqr | ) |
Definition at line 404 of file ossl_bn.c.
References eBNError, GetBN, GetBNPtr, NewBN, NULL, ossl_bn_ctx, ossl_raise(), r1, r2, rb_ary_new3, rb_obj_class(), and SetBN.
BIGNUM_3c | ( | mod_add | ) |
void Init_ossl_bn | ( | void | ) |
Definition at line 1044 of file ossl_bn.c.
References cBN, eBNError, eOSSLError, mOSSL, ossl_bn_alloc(), ossl_bn_coerce(), ossl_bn_copy(), ossl_bn_ctx, ossl_bn_eq(), ossl_bn_eql(), ossl_bn_hash(), ossl_bn_initialize(), ossl_bn_is_prime(), ossl_bn_is_prime_fasttest(), ossl_bn_s_generate_prime(), ossl_bn_to_bn(), ossl_bn_to_i(), ossl_bn_to_s(), ossl_raise(), rb_cObject, rb_define_alias(), rb_define_alloc_func(), rb_define_class_under(), rb_define_copy_func, rb_define_method(), rb_define_module(), rb_define_singleton_method(), rb_eRuntimeError, and rb_eStandardError.
Referenced by Init_openssl().
|
static |
Definition at line 79 of file ossl_bn.c.
References ALLOCV_END, ALLOCV_N, bin, buf, eBNError, FIX2LONG, FIXNUM_P, INTEGER_PACK_BIG_ENDIAN, labs(), len, NULL, ossl_raise(), rb_absint_size(), rb_integer_pack(), and rb_raise().
Referenced by ossl_bn_initialize(), and try_convert_to_bn().
Definition at line 166 of file ossl_bn.c.
References eBNError, NewBN, NULL, ossl_raise(), and SetBN.
Referenced by Init_ossl_bn().
Definition at line 329 of file ossl_bn.c.
References cBN, NULL, ossl_bn_to_i(), ossl_bn_to_s(), ossl_raise(), rb_assoc_new(), rb_eTypeError, rb_obj_is_kind_of(), RTEST, T_BIGNUM, T_FIXNUM, T_STRING, and TYPE.
Referenced by Init_ossl_bn().
Definition at line 842 of file ossl_bn.c.
References eBNError, GetBN, GetBNPtr, NULL, ossl_raise(), and rb_check_frozen.
Referenced by Init_ossl_bn().
Definition at line 895 of file ossl_bn.c.
References GetBN, NIL_P, Qfalse, Qtrue, and try_convert_to_bn().
Referenced by Init_ossl_bn().
Definition at line 920 of file ossl_bn.c.
References cBN, GetBN, Qfalse, Qtrue, and rb_obj_is_kind_of().
Referenced by Init_ossl_bn().
Definition at line 941 of file ossl_bn.c.
References buf, eBNError, GetBN, hash(), len, NULL, ossl_raise(), rb_memhash(), ST2FIX, xfree(), and xmalloc.
Referenced by Init_ossl_bn().
Definition at line 191 of file ossl_bn.c.
References cBN, eBNError, GetBN, integer_to_bnptr(), NULL, NUM2INT, ossl_raise(), rb_eArgError, RB_INTEGER_TYPE_P, rb_obj_is_kind_of(), rb_scan_args(), RSTRING_LENINT, RTEST, StringValueCStr, and StringValuePtr.
Referenced by Init_ossl_bn().
Definition at line 975 of file ossl_bn.c.
References eBNError, GetBN, NULL, NUM2INT, ossl_bn_ctx, ossl_raise(), Qfalse, Qnil, Qtrue, and rb_scan_args().
Referenced by Init_ossl_bn().
Definition at line 1011 of file ossl_bn.c.
References eBNError, GetBN, NIL_P, NULL, NUM2INT, ossl_bn_ctx, ossl_raise(), Qfalse, Qnil, Qtrue, and rb_scan_args().
Referenced by Init_ossl_bn().
Definition at line 63 of file ossl_bn.c.
References cBN, eBNError, NewBN, NULL, ossl_raise(), and SetBN.
Referenced by asn1integer_to_num(), ossl_dh_get_params(), ossl_dsa_get_params(), and ossl_rsa_get_params().
Definition at line 788 of file ossl_bn.c.
References add, eBNError, GetBNPtr, NewBN, NIL_P, NULL, NUM2INT, ossl_raise(), Qfalse, rb_scan_args(), result, and SetBN.
Referenced by Init_ossl_bn().
Definition at line 323 of file ossl_bn.c.
Referenced by Init_ossl_bn().
Definition at line 305 of file ossl_bn.c.
References eBNError, GetBN, NULL, ossl_raise(), Qtrue, and rb_cstr_to_inum().
Referenced by Init_ossl_bn(), and ossl_bn_coerce().
Definition at line 261 of file ossl_bn.c.
References buf, eBNError, GetBN, len, NULL, NUM2INT, ossl_buf2str(), ossl_raise(), rb_eArgError, rb_long2int, rb_scan_args(), rb_str_new(), RSTRING_PTR, and strlen().
Referenced by Init_ossl_bn(), and ossl_bn_coerce().
BIGNUM* ossl_bn_value_ptr | ( | volatile VALUE * | ptr | ) |
Definition at line 141 of file ossl_bn.c.
References GetBN, NIL_P, ossl_raise(), rb_eTypeError, and try_convert_to_bn().
Definition at line 124 of file ossl_bn.c.
References cBN, integer_to_bnptr(), NewBN, NULL, Qnil, RB_INTEGER_TYPE_P, rb_obj_is_kind_of(), and SetBN.
Referenced by ossl_bn_eq(), and ossl_bn_value_ptr().
VALUE cBN |
Definition at line 51 of file ossl_bn.c.
Referenced by Init_ossl_bn(), ossl_bn_coerce(), ossl_bn_eql(), ossl_bn_initialize(), ossl_bn_new(), and try_convert_to_bn().
VALUE eBNError |
Definition at line 57 of file ossl_bn.c.
Referenced by BIGNUM_1c(), Init_ossl_bn(), integer_to_bnptr(), ossl_bn_alloc(), ossl_bn_copy(), ossl_bn_hash(), ossl_bn_initialize(), ossl_bn_is_prime(), ossl_bn_is_prime_fasttest(), ossl_bn_new(), ossl_bn_s_generate_prime(), ossl_bn_to_i(), and ossl_bn_to_s().
BN_CTX* ossl_bn_ctx |
Definition at line 163 of file ossl_bn.c.
Referenced by BIGNUM_1c(), Init_ossl_bn(), ossl_bn_is_prime(), and ossl_bn_is_prime_fasttest().
|
static |