File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ /* LibTomCrypt, modular cryptographic library -- Tom St Denis
2+ *
3+ * LibTomCrypt is a library that provides various cryptographic
4+ * algorithms in a highly modular and flexible manner.
5+ *
6+ * The library is free for all purposes without any express
7+ * guarantee it works.
8+ */
9+
10+ #include "tomcrypt.h"
11+
12+ #ifdef LTC_MECC
13+
14+ int ecc_get_set_by_name (const char * name , const ltc_ecc_set_type * * dp )
15+ {
16+ int i ;
17+
18+ LTC_ARGCHK (dp != NULL );
19+ LTC_ARGCHK (name != NULL );
20+
21+ * dp = NULL ;
22+
23+ for (i = 0 ; ltc_ecc_sets [i ].size != 0 && ltc_ecc_sets [i ].name != NULL ; i ++ ) {
24+ if (XSTRCMP (ltc_ecc_sets [i ].name , name ) == 0 ) break ;
25+ }
26+
27+ if (ltc_ecc_sets [i ].size == 0 || ltc_ecc_sets [i ].name == NULL ) {
28+ /* not found */
29+ return CRYPT_INVALID_ARG ;
30+ }
31+
32+ * dp = & ltc_ecc_sets [i ];
33+ return CRYPT_OK ;
34+ }
35+
36+ #endif
37+
38+ /* ref: $Format:%D$ */
39+ /* git commit: $Format:%H$ */
40+ /* commit time: $Format:%ai$ */
You can’t perform that action at this time.
0 commit comments