Merge "Apply millisecond of DateTime for Calendar" into tizen_2.1
[platform/framework/native/appfw.git] / inc / FSecPkcsTypes.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file                FSecPkcsTypes.h
20  * @brief               This is the header file for the declarations of the %PkcsAlgorithmParameterType and %Pkcs08TagValue enumerators and the AttributeType OID List.
21  *
22  * This header file contains the declarations of the %PkcsAlgorithmParameterType and %Pkcs08TagValue enumerators and the AttributeType OID List.
23  */
24
25 #ifndef _FSEC_PKCS_TYPES_H_
26 #define _FSEC_PKCS_TYPES_H_
27
28 #include <FBaseString.h>
29
30 namespace Tizen { namespace Security { namespace Pkcs
31 {
32
33 /**
34  * @enum    PkcsAlgorithmParameterType
35  *
36  * Defines the types of parameters.
37  *
38  * @since               2.1
39  */
40 enum PkcsAlgorithmParameterType
41 {
42         PKCS_ALGO_PARAM_TYPE_IV,              /**< The parameter type is initial vector */
43         PKCS_ALGO_PARAM_TYPE_PKCS05_PBES02,   /**< The parameter type is pkcs5 password based encryption scheme2 */
44         PKCS_ALGO_PARAM_TYPE_PKCS05_KDF02,    /**< The parameter type is pkcs5 password based key derivation scheme2 */
45         PKCS_ALGO_PARAM_TYPE_PKCS05_MAC,      /**< The parameter type is pkcs5 message authentication scheme */
46         PKCS_ALGO_PARAM_TYPE_RC2,             /**< The parameter type is rc2 cbc */
47         PKCS_ALGO_PARAM_TYPE_UNKOWN = 0xFFFFFFFF  /**< An unknown parameter type */
48 }; //PkcsAlgorithmParameterType;
49
50 /**
51  * @enum        Pkcs08TagValue
52  *
53  * Defines the Asn1 tag type.
54  *
55  * @since 2.1
56  */
57 enum Pkcs08TagValue
58 {
59         PKCS08_TAG_RESERVED = 0, /**< Reserved for use by the encoding rules */
60         PKCS08_TAG_BOOLEAN = 1, /**< An arbitrary bool value */
61         PKCS08_TAG_INTEGER = 2, /**< An arbitrary integer value */
62         PKCS08_TAG_BITSTRING = 3, /**< An arbitrary string of bits */
63         PKCS08_TAG_OCTETSTRING = 4, /**< An arbitrary string of octets */
64         PKCS08_TAG_NULL = 5, /**< A null value */
65         PKCS08_TAG_OBJECT_ID = 6, /**< An object identifier */
66         PKCS08_TAG_OBJECT_DES = 7, /**< An object descriptor providing a brief description of an object */
67         PKCS08_TAG_EXTERNAL = 8, /**< An arbitrary external value */
68         PKCS08_TAG_REAL = 9, /**< An arbitrary real value */
69         PKCS08_TAG_ENUM = 10, /**< An enumerated value */
70         PKCS08_TAG_EMBEDDED = 11, /**< An embedded value */
71         PKCS08_TAG_UTF8STRING = 12, /**< An arbitrary utf8 string */
72         PKCS08_TAG_REL_OBJ_ID = 13, /**< A relative object ID */
73         PKCS08_TAG_SEQUENCE = 16, /**< An ordered collection of one or more types */
74         PKCS08_TAG_SET = 17, /**< An unordered collection of one or more types */
75         PKCS08_TAG_CHAR_STRING = 18, /**< A numeric string */
76         PKCS08_TAG_PRINTABLE_STRING = 19, /**< An arbitrary string of printable characters */
77         PKCS08_TAG_TELETEXT_STRING = 20, /**< A teletext string, T61 string */
78         PKCS08_TAG_VIDEOTEXT_STRING = 21, /**< A videotext string */
79         PKCS08_TAG_IA5STRING = 22, /**< An arbitrary string of IA5 (ASCII) characters */
80         PKCS08_TAG_UTC_TIME = 23, /**< A coordinated universal time or Greenwich Mean Time (GMT) value */
81         PKCS08_TAG_GEN_TIME = 24, /**< A generalized time */
82         PKCS08_TAG_GRAPHICS_STRING = 25, /**< A graphic string */
83         PKCS08_TAG_VISIBLE_STRING = 26, /**< A visible string, ISO64 string */
84         PKCS08_TAG_GENERAL_STRING = 27, /**< A general string */
85         PKCS08_TAG_UNIVERSAL_STRING = 28, /**< A universal string */
86         PKCS08_TAG_CHARACTER_STRING = 29, /**< An arbitrary character string */
87         PKCS08_TAG_BMP_STRING = 30, /**< A bmp string */
88         PKCS08_TAG_UNKNOWN = -1 /**< An unknown tag type */
89 }; // Pkcs08TagValue;
90
91 /*
92 -- Basic object identifiers in Pkcs05 and Pkcs08
93 */
94
95 _OSP_EXPORT_ extern const wchar_t OID_PKCS_05[];    /**< An object identifier for pkcs05 */
96 _OSP_EXPORT_ extern const wchar_t OID_PBKDF2[];  /**< An object identifier for password based key derivation function scheme2 */
97 _OSP_EXPORT_ extern const wchar_t OID_PBES2[];   /**< An object identifier for password based encryption scheme2 */
98 _OSP_EXPORT_ extern const wchar_t OID_PBMAC1[];  /**< An object identifier for password based message authetication scheme1 */
99 _OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA1[];  /**< An object identifier for hmac-sha1 */
100 _OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_224[];  /**< An object identifier for hmac-sha224 */
101 _OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_256[];  /**< An object identifier for hmac-sha256 */
102 _OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_384[]; /**< An object identifier for hmac-sha384 */
103 _OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_512[]; /**< An object identifier for hmac-sha512 */
104 _OSP_EXPORT_ extern const wchar_t OID_DES_CBC[];  /**< An object identifier for des-cbc mode */
105 _OSP_EXPORT_ extern const wchar_t OID_DES_CBC_EDE3[];   /**< An object identifier for des-cbc-ede3 mode */
106 _OSP_EXPORT_ extern const wchar_t OID_AES_128_CBC[];    /**< An object identifier for aes-128-cbc mode */
107 _OSP_EXPORT_ extern const wchar_t OID_AES_192_CBC[];   /**< An object identifier for aes-192-cbc mode */
108 _OSP_EXPORT_ extern const wchar_t OID_AES_256_CBC[];   /**< An object identifier for aes-256-cbc mode */
109 _OSP_EXPORT_ extern const wchar_t OID_RC2_CBC[];    /**< An object identifier for rc2-cbc mode */
110 _OSP_EXPORT_ extern const wchar_t OID_PKCS_08[];    /**< An object identifier for pkcs08 */
111 _OSP_EXPORT_ extern const wchar_t OID_RSA_ENCRYPTION[];   /**< An object identifier for RSA encryption scheme */
112
113
114 /*
115 -- Basic object identifiers in Pkcs08 for AttributeType
116 */
117
118 _OSP_EXPORT_ extern const wchar_t OID_ATTR_NAME[];  /**< object identifier for attribute type name. */
119 _OSP_EXPORT_ extern const wchar_t OID_ATTR_SURNAME[];    /**< object identifier for attribute type surname. */
120 _OSP_EXPORT_ extern const wchar_t OID_ATTR_GIVEN_NAME[]; /**< object identifier for attribute type of any given name. */
121 _OSP_EXPORT_ extern const wchar_t OID_ATTR_INITIAL[];   /**< object identifier for attribute type initial. */
122 _OSP_EXPORT_ extern const wchar_t OID_ATTR_GEN_QUALIFIER[];  /**< object identifier for attribute type generation qualifier. */
123 _OSP_EXPORT_ extern const wchar_t OID_ATTR_COMMON_NAME[]; /**< object identifier for attribute type common name. */
124 _OSP_EXPORT_ extern const wchar_t OID_ATTR_LOCALITY_NAME[];  /**< object identifier for attribute type locality name. */
125 _OSP_EXPORT_ extern const wchar_t OID_ATTR_STATE_OR_PROV_NAME[];   /**< object identifier for attribute type state/province name. */
126 _OSP_EXPORT_ extern const wchar_t OID_ATTR_ORG_NAME[]; /**< object identifier for attribute type of any orgnization name. */
127 _OSP_EXPORT_ extern const wchar_t OID_ATTR_ORG_UNIT_NAME[];    /**< object identifier for any orgnization unit name. */
128 _OSP_EXPORT_ extern const wchar_t OID_ATTR_TITLE[]; /**< object identifier for attribute type title. */
129 _OSP_EXPORT_ extern const wchar_t OID_ATTR_DN_QUALIFIER[];   /**< object identifier for distinguished name qualifier. */
130 _OSP_EXPORT_ extern const wchar_t OID_ATTR_COUNTRY_NAME[];    /**< object identifier for attribute type country name. */
131 _OSP_EXPORT_ extern const wchar_t OID_ATTR_SERIAL_NUMBER[];   /**< object identifier for attribute type serial number. */
132 _OSP_EXPORT_ extern const wchar_t OID_ATTR_PSEUDONYM[]; /**< object identifier for attribute type pseudonym. */
133 _OSP_EXPORT_ extern const wchar_t OID_ATTR_DOMAIN_COMPONENT[]; /**< object identifier for any domain component. */
134 _OSP_EXPORT_ extern const wchar_t OID_ATTR_EMAIL_ADDRESS[];  /**< object identifier for any email address. */
135
136 } } } // Tizen::Security::Pkcs
137
138
139
140
141 #endif // _FSEC_PKCS_TYPES_H_