Revision control

Copy as Markdown

Other Tools

/*
* This file was automatically generated by {{ script }} on {{ date }}
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/internal/pcurves.h>
#include <botan/assert.h>
#include <botan/internal/mem_utils.h>
#include <botan/internal/pcurves_instance.h>
namespace Botan::PCurve {
void PrimeOrderCurve::Scalar::_zeroize() {
secure_zeroize_buffer(m_value.data(), m_value.size() * sizeof(word));
}
//static
std::shared_ptr<const PrimeOrderCurve> PrimeOrderCurve::from_params(
const BigInt& p, const BigInt& a, const BigInt& b, const BigInt& base_x, const BigInt& base_y, const BigInt& order) {
#if defined(BOTAN_HAS_PCURVES_GENERIC)
return PCurveInstance::from_params(p, a, b, base_x, base_y, order);
#endif
BOTAN_UNUSED(p, a, b, base_x, base_y, order);
return {};
}
//static
std::shared_ptr<const PrimeOrderCurve> PrimeOrderCurve::for_named_curve(std::string_view name) {
{%- for curve in pcurves %}
#if defined(BOTAN_HAS_PCURVES_{{curve["Name"] | upper}})
if(name == "{{curve["Name"]}}") {
return PCurveInstance::{{curve["Name"]}}();
}
#endif
{% endfor %}
BOTAN_UNUSED(name);
return {};
}
} // namespace Botan::PCurve