cecies
constants.h
Go to the documentation of this file.
1/*
2 Copyright 2020 Raphael Beck
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
37#ifndef CECIES_CONSTANTS_H
38#define CECIES_CONSTANTS_H
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
48#define CECIES_VERSION 401
49
53#define CECIES_VERSION_STR "4.0.1"
54
58#define CECIES_X25519_KEY_SIZE 32
59
63#define CECIES_X448_KEY_SIZE 56
64
65/*
66 * Some error codes:
67 */
68
69#define CECIES_ENCRYPT_ERROR_CODE_NULL_ARG 1000
70#define CECIES_ENCRYPT_ERROR_CODE_INVALID_ARG 1001
71#define CECIES_ENCRYPT_ERROR_CODE_INSUFFICIENT_OUTPUT_BUFFER_SIZE 1002
72#define CECIES_ENCRYPT_ERROR_CODE_OUT_OF_MEMORY 1003
73#define CECIES_ENCRYPT_ERROR_CODE_COMPRESSION_FAILED 1004
74
75#define CECIES_DECRYPT_ERROR_CODE_NULL_ARG 2000
76#define CECIES_DECRYPT_ERROR_CODE_INVALID_ARG 2001
77#define CECIES_DECRYPT_ERROR_CODE_INSUFFICIENT_OUTPUT_BUFFER_SIZE 2002
78#define CECIES_DECRYPT_ERROR_CODE_OUT_OF_MEMORY 2003
79
80#define CECIES_KEYGEN_ERROR_CODE_NULL_ARG 7000
81#define CECIES_KEYGEN_ERROR_CODE_INVALID_ARG 7001
82
83#ifdef __cplusplus
84} // extern "C"
85#endif
86
87#endif // CECIES_CONSTANTS_H