/
iandatypes.ads
71 lines (57 loc) · 2.51 KB
/
iandatypes.ads
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
------------------------------------------------------------------
-- Tokeneer ID Station Core Software
--
-- Copyright (2003) United States Government, as represented
-- by the Director, National Security Agency.All rights reserved.
--
-- This material was originally developed by Praxis High Integrity
-- Systems Ltd.under contract to the National Security Agency.
------------------------------------------------------------------
------------------------------------------------------------------
-- IandATypes
--
-- Description:
-- Types that appear within the context of an I&A certificate
--
------------------------------------------------------------------
with CommonTypes,
CryptoTypes;
package IandATypes is
------------------------------------------------------------------
-- Types
--
------------------------------------------------------------------
-- FAR (False Accept Rate) is used to determine how similar a fingerprint
-- needs to be to 'match' a template.The higher the value, the larger the
-- allowed deviation from the template.
type FarT is range 0..2**31 - 1;
for FarT'Size use 32;
function FarT_Image (X : FarT) return CommonTypes.StringF1L1000 is
(FarT'Image (X));
pragma Annotate (GNATprove, False_Positive,
"predicate check might fail",
"Image of integers of type FarT are short strings starting at index 1");
type MatchResultT is (Match, NoMatch);
-- The biometric template contains fictional fields to simplify the
-- Test Driver API.Includes a TemplateLength field, a RequiredMaxFAR
-- field, an ID field and padding to bring up to the maximum size currently
-- allowed by the Identicator format (500 bytes).
type TemplatePadI is range 1..452;
type TemplatePadT is array(TemplatePadI) of CommonTypes.ByteT;
NullTemplatePad : constant TemplatePadT :=
TemplatePadT'(others => CommonTypes.ByteT'First);
subtype TemplateLengthT is CommonTypes.Unsigned32T;
subtype TemplateIDI is Positive range 1..40;
subtype TemplateIDT is String(TemplateIDI);
type TemplateT is record
Length : TemplateLengthT;
RequiredMaxFAR : FarT;
ID : TemplateIDT;
Pad : TemplatePadT;
end record;
NullTemplate : constant TemplateT :=
TemplateT'(Length => TemplateLengthT'First,
RequiredMaxFAR => FarT'First,
ID => TemplateIDT'(others => ' '),
Pad => NullTemplatePad);
end IandATypes;