Method: OpenSSL::PKey::EC::Group#cofactor
- Defined in:
- ossl_pkey_ec.c
#get_cofactor ⇒ Object
See the OpenSSL documentation for EC_GROUP_get_cofactor()
911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 |
# File 'ossl_pkey_ec.c', line 911
static VALUE ossl_ec_group_get_cofactor(VALUE self)
{
VALUE bn_obj;
BIGNUM *bn;
EC_GROUP *group = NULL;
Require_EC_GROUP(self, group);
bn_obj = ossl_bn_new(NULL);
bn = GetBNPtr(bn_obj);
if (EC_GROUP_get_cofactor(group, bn, ossl_bn_ctx) != 1)
ossl_raise(eEC_GROUP, "EC_GROUP_get_cofactor");
return bn_obj;
}
|