Go to the source code of this file.
◆ BIGNUM_1c
#define BIGNUM_1c |
( |
|
func | ) |
|
Value: static VALUE \
ossl_bn_##func(
VALUE self) \
{ \
BIGNUM *bn, *result; \
GetBN(self, bn); \
if (!(result = BN_new())) { \
} \
BN_free(result); \
} \
}
VALUE rb_obj_class(VALUE)
Equivalent to Object#class in Ruby.
Definition at line 392 of file ossl_bn.c.
◆ BIGNUM_2
Value: static VALUE \
{ \
BIGNUM *bn1, *bn2 =
GetBNPtr(other), *result; \
GetBN(self, bn1); \
if (!(result = BN_new())) { \
} \
if (BN_##func(result, bn1, bn2) <= 0) { \
BN_free(result); \
} \
}
◆ BIGNUM_2c
#define BIGNUM_2c |
( |
|
func | ) |
|
Value: static VALUE \
{ \
BIGNUM *bn1, *bn2 =
GetBNPtr(other), *result; \
GetBN(self, bn1); \
if (!(result = BN_new())) { \
} \
BN_free(result); \
} \
}
◆ BIGNUM_3c
#define BIGNUM_3c |
( |
|
func | ) |
|
Value: static VALUE \
{ \
BIGNUM *bn3 =
GetBNPtr(other2), *result; \
GetBN(self, bn1); \
if (!(result = BN_new())) { \
} \
if (BN_##func(result, bn1, bn2, bn3,
ossl_bn_ctx) <= 0) { \
BN_free(result); \
} \
}
Definition at line 557 of file ossl_bn.c.
◆ BIGNUM_BIT
#define BIGNUM_BIT |
( |
|
func | ) |
|
Value: static VALUE \
{ \
BIGNUM *bn; \
GetBN(self, bn); \
if (BN_##func(bn,
NUM2INT(bit)) <= 0) { \
} \
return self; \
}
◆ BIGNUM_BOOL1
#define BIGNUM_BOOL1 |
( |
|
func | ) |
|
Value: static VALUE \
ossl_bn_##func(
VALUE self) \
{ \
BIGNUM *bn; \
GetBN(self, bn); \
if (BN_##func(bn)) { \
} \
}
Definition at line 344 of file ossl_bn.c.
◆ BIGNUM_CMP
#define BIGNUM_CMP |
( |
|
func | ) |
|
Value: static VALUE \
{ \
GetBN(self, bn1); \
return
INT2NUM(BN_##func(bn1, bn2)); \
}
Definition at line 910 of file ossl_bn.c.
◆ BIGNUM_NUM
#define BIGNUM_NUM |
( |
|
func | ) |
|
Value: static VALUE \
ossl_bn_##func(
VALUE self) \
{ \
BIGNUM *bn; \
GetBN(self, bn); \
}
Definition at line 838 of file ossl_bn.c.
◆ BIGNUM_RAND
#define BIGNUM_RAND |
( |
|
func | ) |
|
Value: static VALUE \
{ \
BIGNUM *result; \
int bottom = 0,
top = 0, b; \
VALUE bits, fill, odd,
obj; \
\
case 3: \
bottom = (odd ==
Qtrue) ? 1 : 0; \
\
case 2: \
} \
if (!(result = BN_new())) { \
} \
if (BN_##func(result, b,
top, bottom) <= 0) { \
BN_free(result); \
} \
}
Definition at line 720 of file ossl_bn.c.
◆ BIGNUM_RAND_RANGE
#define BIGNUM_RAND_RANGE |
( |
|
func | ) |
|
Value: static VALUE \
{ \
if (!(result = BN_new())) { \
} \
if (BN_##func##_range(result, bn) <= 0) { \
BN_free(result); \
} \
}
#define range(low, item, hi)
Definition at line 760 of file ossl_bn.c.
◆ BIGNUM_SELF_SHIFT
#define BIGNUM_SELF_SHIFT |
( |
|
func | ) |
|
Value: static VALUE \
{ \
BIGNUM *bn; \
int b; \
GetBN(self, bn); \
if (BN_##func(bn, bn, b) <= 0) \
return self; \
}
Definition at line 693 of file ossl_bn.c.
◆ BIGNUM_SHIFT
#define BIGNUM_SHIFT |
( |
|
func | ) |
|
Value: static VALUE \
{ \
BIGNUM *bn, *result; \
int b; \
GetBN(self, bn); \
if (!(result = BN_new())) { \
} \
if (BN_##func(result, bn, b) <= 0) { \
BN_free(result); \
} \
}
Definition at line 658 of file ossl_bn.c.
◆ GetBN
#define GetBN |
( |
|
obj, |
|
|
|
bn |
|
) |
| |
Value: do { \
TypedData_Get_Struct((
obj), BIGNUM, &ossl_bn_type, (bn)); \
if (!(bn)) { \
} \
} while (0)
Definition at line 22 of file ossl_bn.c.
◆ NewBN
◆ SetBN
#define SetBN |
( |
|
obj, |
|
|
|
bn |
|
) |
| |
Value: do { \
if (!(bn)) { \
} \
RTYPEDDATA_DATA(
obj) = (bn); \
} while (0)
Definition at line 15 of file ossl_bn.c.
◆ BIGNUM_1c()
◆ BIGNUM_3c()
◆ Init_ossl_bn()
Definition at line 1095 of file ossl_bn.c.
References cBN, eBNError, eOSSLError, mOSSL, ossl_bn_ctx, ossl_raise(), rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_module(), rb_eRuntimeError, and rb_eStandardError.
◆ ossl_bn_new()
◆ ossl_bn_value_ptr()
BIGNUM * ossl_bn_value_ptr |
( |
volatile VALUE * |
ptr | ) |
|
◆ cBN
◆ eBNError
◆ ossl_bn_ctx