mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
When XCA started in 2002, there were no C++ initializers. Drop explicit initializers from the constructors. - Fix indentations of section declarators. - Replace NULL by nullptr when feasible. - Sort private section: properties first, then methods.
49 lines
825 B
C++
49 lines
825 B
C++
/* vi: set sw=4 ts=4:
|
|
*
|
|
* Copyright (C) 2014 - 2020 Christian Hohnstaedt.
|
|
*
|
|
* All rights reserved.
|
|
*/
|
|
|
|
#ifndef __BUILTIN_EC_CURVES_H
|
|
#define __BUILTIN_EC_CURVES_H
|
|
|
|
#include <QString>
|
|
#include <QList>
|
|
|
|
#include "base.h"
|
|
|
|
#define CURVE_X962 1
|
|
#define CURVE_OTHER 2
|
|
#define CURVE_RFC5480 3
|
|
|
|
class builtin_curve
|
|
{
|
|
public:
|
|
int nid{};
|
|
QString comment{};
|
|
unsigned order_size{};
|
|
int flags{};
|
|
/* type: CKF_EC_F_P || CKF_EC_F_2M */
|
|
unsigned long type{};
|
|
|
|
builtin_curve(int n, QString c, int s, int f, int t)
|
|
: nid(n), comment(c), order_size(s), flags(f), type(t) { };
|
|
builtin_curve() = delete;
|
|
};
|
|
|
|
class builtin_curves: public QList<builtin_curve>
|
|
{
|
|
public:
|
|
builtin_curves();
|
|
bool containNid(int nid)
|
|
{
|
|
foreach(const builtin_curve &c, *this)
|
|
if (c.nid == nid)
|
|
return true;
|
|
return false;
|
|
}
|
|
};
|
|
|
|
#endif
|