Enrollment 28.2.0
Loading...
Searching...
No Matches
ISONCTemplate.h
Go to the documentation of this file.
1
9
10#pragma once
11
13#include "enrollment/Export.h"
15
16namespace inno
17{
21 */
22 class ISONCTemplate : public Serializable
23 {
24 public:
28 */
29 [[nodiscard]] std::vector<uint8_t> GetData() const
30 {
31 return data;
32 }
33
38 */
39 explicit ISONCTemplate(std::vector<uint8_t>&& d)
40 : data(std::move(d))
41 {
42 if (data.empty())
43 {
44 throw InvalidTemplateException("Empty data in ISONCTemplate");
45 }
46 }
47
52 */
53 explicit ISONCTemplate(const std::vector<uint8_t>& d)
54 : data(d)
55 {
56 if (data.empty())
57 {
58 throw InvalidTemplateException("Empty data in ISONCTemplate");
59 }
60 }
62 void WriteTo(Writer& writer) const final
63 {
64 writer.WriteArray("d", data);
65 }
66
67 ISONCTemplate() = delete;
68
69 private:
70 std::vector<uint8_t> data;
71 };
72} // namespace inno
ISO/IEC 19794-2:2005 template, template version 2.0, 5-byte format for minutiae (normal card encoding...
Definition ISONCTemplate.h:22
std::vector< uint8_t > GetData() const
Provides template data.
Definition ISONCTemplate.h:28
ISONCTemplate(const std::vector< uint8_t > &d)
Create ISONCTemplate object, copy data to template.
Definition ISONCTemplate.h:52
void WriteTo(Writer &writer) const final
Write itself into writer.
Definition ISONCTemplate.h:61
ISONCTemplate(std::vector< uint8_t > &&d)
Create ISONCTemplate object move data to template.
Definition ISONCTemplate.h:38
Provides interface for serialization of all classes.
Definition Writer.h:164