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; \
VALUE obj; \
GetBN(self, bn); \
if (!(result = BN_new())) { \
} \
BN_free(result); \
} \
SetBN(obj, result); \
return obj; \
}
VALUE rb_obj_class(VALUE)
call-seq: obj.class -> class
Definition at line 389 of file ossl_bn.c.
◆ BIGNUM_2
Value:static VALUE \
{ \
BIGNUM *bn1, *bn2 =
GetBNPtr(other), *result; \
VALUE obj; \
GetBN(self, bn1); \
if (!(result = BN_new())) { \
} \
if (!BN_##func(result, bn1, bn2)) { \
BN_free(result); \
} \
SetBN(obj, result); \
return obj; \
}
VALUE rb_obj_class(VALUE)
call-seq: obj.class -> class
◆ BIGNUM_2c
#define BIGNUM_2c |
( |
|
func | ) |
|
Value:static VALUE \
{ \
BIGNUM *bn1, *bn2 =
GetBNPtr(other), *result; \
VALUE obj; \
GetBN(self, bn1); \
if (!(result = BN_new())) { \
} \
BN_free(result); \
} \
SetBN(obj, result); \
return obj; \
}
VALUE rb_obj_class(VALUE)
call-seq: obj.class -> class
◆ BIGNUM_3c
#define BIGNUM_3c |
( |
|
func | ) |
|
Value:static VALUE \
{ \
BIGNUM *bn3 =
GetBNPtr(other2), *result; \
VALUE obj; \
GetBN(self, bn1); \
if (!(result = BN_new())) { \
} \
if (!BN_##func(result, bn1, bn2, bn3,
ossl_bn_ctx)) { \
BN_free(result); \
} \
SetBN(obj, result); \
return obj; \
}
VALUE rb_obj_class(VALUE)
call-seq: obj.class -> class
Definition at line 544 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))) { \
} \
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 341 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 897 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 825 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)) { \
BN_free(result); \
} \
SetBN(obj, result); \
return obj; \
}
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
Definition at line 707 of file ossl_bn.c.
◆ BIGNUM_RAND_RANGE
#define BIGNUM_RAND_RANGE |
( |
|
func | ) |
|
Value:static VALUE \
{ \
VALUE obj =
NewBN(klass); \
if (!(result = BN_new())) { \
} \
if (!BN_##func##_range(result, bn)) { \
BN_free(result); \
} \
SetBN(obj, result); \
return obj; \
}
#define range(low, item, hi)
Definition at line 747 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)) \
return self; \
}
Definition at line 680 of file ossl_bn.c.
◆ BIGNUM_SHIFT
#define BIGNUM_SHIFT |
( |
|
func | ) |
|
Value:static VALUE \
{ \
BIGNUM *bn, *result; \
int b; \
VALUE obj; \
GetBN(self, bn); \
if (!(result = BN_new())) { \
} \
if (!BN_##func(result, bn, b)) { \
BN_free(result); \
} \
SetBN(obj, result); \
return obj; \
}
VALUE rb_obj_class(VALUE)
call-seq: obj.class -> class
Definition at line 645 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.
Referenced by BIGNUM_1c(), and BIGNUM_3c().
◆ NewBN
◆ SetBN
#define SetBN |
( |
|
obj, |
|
|
|
bn |
|
) |
| |
◆ BIGNUM_1c()
Definition at line 413 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()
◆ Init_ossl_bn()
void Init_ossl_bn |
( |
void |
| ) |
|
Definition at line 1082 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