Method: OpenSSL::PKey::EC::Group#seed

Defined in:
ossl_pkey_ec.c

#seedString?

See the OpenSSL documentation for EC_GROUP_get0_seed()

Returns:

  • (String, nil)


1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
# File 'ossl_pkey_ec.c', line 1094

static VALUE ossl_ec_group_get_seed(VALUE self)
{
    EC_GROUP *group = NULL;
    size_t seed_len;

    Require_EC_GROUP(self, group);

    seed_len = EC_GROUP_get_seed_len(group);

    if (seed_len == 0)
        return Qnil;

    return rb_str_new((const char *)EC_GROUP_get0_seed(group), seed_len);
}