Lines Matching defs:params

59 ECCurveParams_dup(const ECCurveParams * params, int kmflag)
69 if (params->text != NULL) {
71 ret->text = kmem_alloc(strlen(params->text) + 1, kmflag);
72 bcopy(params->text, ret->text, strlen(params->text) + 1);
74 CHECK(ret->text = strdup(params->text));
77 ret->field = params->field;
78 ret->size = params->size;
79 if (params->irr != NULL) {
81 ret->irr = kmem_alloc(strlen(params->irr) + 1, kmflag);
82 bcopy(params->irr, ret->irr, strlen(params->irr) + 1);
84 CHECK(ret->irr = strdup(params->irr));
87 if (params->curvea != NULL) {
89 ret->curvea = kmem_alloc(strlen(params->curvea) + 1, kmflag);
90 bcopy(params->curvea, ret->curvea, strlen(params->curvea) + 1);
92 CHECK(ret->curvea = strdup(params->curvea));
95 if (params->curveb != NULL) {
97 ret->curveb = kmem_alloc(strlen(params->curveb) + 1, kmflag);
98 bcopy(params->curveb, ret->curveb, strlen(params->curveb) + 1);
100 CHECK(ret->curveb = strdup(params->curveb));
103 if (params->genx != NULL) {
105 ret->genx = kmem_alloc(strlen(params->genx) + 1, kmflag);
106 bcopy(params->genx, ret->genx, strlen(params->genx) + 1);
108 CHECK(ret->genx = strdup(params->genx));
111 if (params->geny != NULL) {
113 ret->geny = kmem_alloc(strlen(params->geny) + 1, kmflag);
114 bcopy(params->geny, ret->geny, strlen(params->geny) + 1);
116 CHECK(ret->geny = strdup(params->geny));
119 if (params->order != NULL) {
121 ret->order = kmem_alloc(strlen(params->order) + 1, kmflag);
122 bcopy(params->order, ret->order, strlen(params->order) + 1);
124 CHECK(ret->order = strdup(params->order));
127 ret->cofactor = params->cofactor;
153 EC_FreeCurveParams(ECCurveParams * params)
155 if (params == NULL)
157 if (params->text != NULL)
159 kmem_free(params->text, strlen(params->text) + 1);
161 free(params->text);
163 if (params->irr != NULL)
165 kmem_free(params->irr, strlen(params->irr) + 1);
167 free(params->irr);
169 if (params->curvea != NULL)
171 kmem_free(params->curvea, strlen(params->curvea) + 1);
173 free(params->curvea);
175 if (params->curveb != NULL)
177 kmem_free(params->curveb, strlen(params->curveb) + 1);
179 free(params->curveb);
181 if (params->genx != NULL)
183 kmem_free(params->genx, strlen(params->genx) + 1);
185 free(params->genx);
187 if (params->geny != NULL)
189 kmem_free(params->geny, strlen(params->geny) + 1);
191 free(params->geny);
193 if (params->order != NULL)
195 kmem_free(params->order, strlen(params->order) + 1);
197 free(params->order);
200 kmem_free(params, sizeof(ECCurveParams));
202 free(params);