[#EC_GROUP_set_generator]
= EC&lowbar;GROUP&lowbar;set&lowbar;generator
:mrdocs:

Sets the generator and its order&sol;cofactor of a EC&lowbar;GROUP object&period;

== Synopsis

Declared in `&lt;openssl&sol;ec&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EC&lowbar;GROUP&lowbar;set&lowbar;generator(
    xref:EC_GROUP.adoc[EC&lowbar;GROUP]* group,
    xref:EC_POINT.adoc[EC&lowbar;POINT] const* generator,
    xref:BIGNUM.adoc[BIGNUM] const* order,
    xref:BIGNUM.adoc[BIGNUM] const* cofactor);
----

== Return Value

1 on success and 0 if an error occurred

== Parameters

[cols="1,4"]
|===
| Name| Description
| *group*
| EC&lowbar;GROUP object
| *generator*
| EC&lowbar;POINT object with the generator&period;
| *order*
| the order of the group generated by the generator&period;
| *cofactor*
| the index of the sub&hyphen;group generated by the generator in the group of all points on the elliptic curve&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
