1 PACKAGE dbms_crypto_toolkit_types AS
2
3 SUBTYPE Crypto_Engine_Function IS POSITIVE;
4
5 SUBTYPE Crypto_Engine_State IS POSITIVE;
6
7 SUBTYPE Identity_Type IS POSITIVE;
8
9 SUBTYPE Cipher IS POSITIVE;
10
11 SUBTYPE Data_Unit_Format IS POSITIVE;
12
13 ------------------------- OPAQUE DATA TYPES ------------------------------
14 -- These data types are intended to be opaque. The contents of the records
15 -- are either not visible to the caller or are to be accessed using
16 -- convenience functions. Unfortunately, PL/SQL does not allow type
17 -- definitions to be hidden inside the package bodies.
18
19 -- Records are used in order to enforce type checking as PL/SQL will
20 -- otherwise do automatic type conversion.
21
22 -- Dummy variables are used to get around PL/SQL restriction which does not
23 -- allow constrained subtypes, e.g. SUBTYPE foo is VARCHAR(15) is not
24 -- allowed.
25
26 wallet_size RAW(200);
27 SUBTYPE Wallet_Internal IS wallet_size%TYPE;
28 TYPE Wallet IS RECORD
29 (Wallet Wallet_Internal
30 );
31
32 persona_internal_size RAW(200);
33 SUBTYPE Persona_Internal IS persona_internal_size%TYPE;
34 TYPE Persona IS RECORD
35 (Persona Persona_Internal
36 );
37
38 identity_internal_size RAW(200);
39 SUBTYPE Identity_Internal IS identity_internal_size%TYPE;
40 TYPE Identity IS RECORD
41 (Descriptor Identity_Internal
42 );
43
44 identity_array_internal_size RAW(200);
45 SUBTYPE Identity_Array_Internal IS identity_array_internal_size%TYPE;
46 TYPE Identity_Array IS RECORD
47 (Descriptor_Array Identity_Array_Internal
48 );
49
50 -------------------------- DATA STRUCTURES --------------------------------
51 alias_string_length VARCHAR2(512);
52 SUBTYPE Alias_String IS alias_string_length%TYPE;
53
54 comment_string_length VARCHAR2(512);
55 SUBTYPE Comment_String IS comment_string_length%TYPE;
56
57 -- This data structure describes an identity. An identity may either
58 -- myself (a persona) or another trusted identity
59 TYPE Identity_Description IS RECORD
60 (alias Alias_String,
61 comment Comment_String
62 );
63
64 -- This table serves as list of the retrieved identity descriptions.
65 TYPE Identity_Description_List IS TABLE OF
66 Identity_Description
67 INDEX BY BINARY_INTEGER;
68
69 -- This record contains the printable alias for a persona as well as the
70 -- complete identity and persona.
71 -- NOTE: the size of the persona field must match that contained within
72 -- the Persona type. PL/SQL will not allow a record to
73 -- contain another record so the Persona could not be used
74 -- directly.
75 TYPE Persona_Description IS RECORD
76 (alias Alias_String,
77 comment Comment_String,
78 identity Identity_Internal,
79 persona Persona_Internal
80 );
81
82 TYPE Persona_List IS TABLE OF
83 Persona_Description
84 INDEX BY BINARY_INTEGER;
85
86 -- This data structure is a place holder until it is determined what
87 -- private information is needed to create a persona.
88 Private_Persona_Info_Size RAW(200);
89 SUBTYPE Private_Persona_Info_Internal IS Private_Persona_Info_Size%TYPE;
90 TYPE Private_Persona_Information is RECORD
91 (information Private_Persona_Info_Internal
92 );
93
94 END dbms_crypto_toolkit_types;