Method: OpenSSL::BN#eql?
- Defined in:
- ossl_bn.c
#eql?(obj) ⇒ Boolean
Returns true
only if obj is a OpenSSL::BN
with the same value as bn. Contrast this with OpenSSL::BN#==, which performs type conversions.
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 |
# File 'ossl_bn.c', line 1070
static VALUE
ossl_bn_eql(VALUE self, VALUE other)
{
BIGNUM *bn1, *bn2;
if (!rb_obj_is_kind_of(other, cBN))
return Qfalse;
GetBN(self, bn1);
GetBN(other, bn2);
return BN_cmp(bn1, bn2) ? Qfalse : Qtrue;
}
|