• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2007 Esmertec AG.
3  * Copyright (C) 2007 The Android Open Source Project
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 #ifndef CSP13_HASH_H
19 #define CSP13_HASH_H
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /**
26  * @param str Tag name
27  * @return integer value with code page in bit 8-15 and tag token in bit 0-7; -1 if not a CSP 1.3 tag
28  */
29 int csp13TagNameToKey(const char * str);
30 
31 /**
32  * @param str Tag name
33  * @return 1 if <code>str</code> is a CSP 1.3 tag of Integer type; 0 if not
34  */
35 int csp13IsIntegerTag(const char * str);
36 
37 /**
38  * @param str Value token string
39  * @param len Length of the value token
40  * @return token value ; -1 if not a valid CSP 1.3 value token
41  */
42 int csp13ValueTokenToKey(const char * str, int len);
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif
49 
50