-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathAutheticity.cs
More file actions
131 lines (104 loc) · 4.93 KB
/
Autheticity.cs
File metadata and controls
131 lines (104 loc) · 4.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
using System.Linq;
namespace Regula.DocumentReader.WebClient.Model.Ext.Autheticity
{
public static class Authenticity
{
public static SecurityFeatureChecks UvLuminescenceChecks(this AuthenticityCheckList auth)
{
return auth.securityFeatureOrNull(AuthenticityResultType.UV_LUMINESCENCE);
}
public static SecurityFeatureChecks LivenessChecks(this AuthenticityCheckList auth)
{
return auth.securityFeatureOrNull(AuthenticityResultType.LIVENESS);
}
public static SecurityFeatureChecks IrB900Checks(this AuthenticityCheckList auth)
{
return auth.securityFeatureOrNull(AuthenticityResultType.IR_B900);
}
public static IdentChecks ImagePatternChecks(this AuthenticityCheckList auth)
{
return auth.identOrNull(AuthenticityResultType.IMAGE_PATTERN);
}
public static SecurityFeatureChecks AxialProtectionChecks(this AuthenticityCheckList auth)
{
return auth.securityFeatureOrNull(AuthenticityResultType.AXIAL_PROTECTION);
}
public static FiberChecks UVFiberChecks(this AuthenticityCheckList auth)
{
return auth.filberOrNull(AuthenticityResultType.UV_FIBERS);
}
public static IdentChecks IRVisibilityChecks(this AuthenticityCheckList auth)
{
return auth.identOrNull(AuthenticityResultType.IR_VISIBILITY);
}
public static OCRSecurityTextChecks OCRSecurityTextChecks(this AuthenticityCheckList auth)
{
return auth.ocrSecurityTextOrNull(AuthenticityResultType.OCR_SECURITY_TEXT);
}
public static ImageIdentChecks IpiChecks(this AuthenticityCheckList auth)
{
return auth.imageIdentOrNull(AuthenticityResultType.IPI);
}
public static SecurityFeatureChecks EmbededImageChecks(this AuthenticityCheckList auth)
{
return auth.securityFeatureOrNull(AuthenticityResultType.PHOTO_EMBED_TYPE);
}
public static SecurityFeatureChecks HologramsChecks(this AuthenticityCheckList auth)
{
return auth.securityFeatureOrNull(AuthenticityResultType.HOLOGRAMS);
}
public static SecurityFeatureChecks OVIChecks(this AuthenticityCheckList auth)
{
return auth.securityFeatureOrNull(AuthenticityResultType.OVI);
}
public static SecurityFeatureChecks ImageAreaChecks(this AuthenticityCheckList auth)
{
return auth.securityFeatureOrNull(AuthenticityResultType.PHOTO_AREA);
}
public static IdentChecks portraitComparisonChecks(this AuthenticityCheckList auth)
{
return auth.identOrNull(AuthenticityResultType.PORTRAIT_COMPARISON);
}
public static SecurityFeatureChecks BarcodeFormatCheckChecks(this AuthenticityCheckList auth)
{
return auth.securityFeatureOrNull(AuthenticityResultType.BARCODE_FORMAT_CHECK);
}
public static IdentChecks KinegramChecks(this AuthenticityCheckList auth)
{
return auth.identOrNull(AuthenticityResultType.KINEGRAM);
}
public static IdentChecks LetterScreenChecks(this AuthenticityCheckList auth)
{
return auth.identOrNull(AuthenticityResultType.LETTER_SCREEN);
}
private static AuthenticityCheckResult resultByType(this AuthenticityCheckList auth, AuthenticityResultType type)
{
return auth?.List.FirstOrDefault(t => t.Type == type);
}
private static FiberChecks filberOrNull(this AuthenticityCheckList auth, AuthenticityResultType type)
{
AuthenticityCheckResult result = auth.resultByType(type);
return result != null ? new FiberChecks(result) : null;
}
private static IdentChecks identOrNull(this AuthenticityCheckList auth, AuthenticityResultType type)
{
AuthenticityCheckResult result = auth.resultByType(type);
return result != null ? new IdentChecks(result) : null;
}
private static ImageIdentChecks imageIdentOrNull(this AuthenticityCheckList auth, AuthenticityResultType type)
{
AuthenticityCheckResult result = auth.resultByType(type);
return result != null ? new ImageIdentChecks(result) : null;
}
private static OCRSecurityTextChecks ocrSecurityTextOrNull(this AuthenticityCheckList auth, AuthenticityResultType type)
{
AuthenticityCheckResult result = auth.resultByType(type);
return result != null ? new OCRSecurityTextChecks(result) : null;
}
private static SecurityFeatureChecks securityFeatureOrNull(this AuthenticityCheckList auth, AuthenticityResultType type)
{
AuthenticityCheckResult result = auth.resultByType(type);
return result != null ? new SecurityFeatureChecks(result) : null;
}
}
}