wolfSSL SSL/TLS library, support up to TLS1.3

Dependents:   CyaSSL-Twitter-OAuth4Tw Example-client-tls-cert TwitterReader TweetTest ... more

Committer:
wolfSSL
Date:
Sat Aug 18 22:20:43 2018 +0000
Revision:
15:117db924cf7c
Child:
16:8e0d178b1d1e
wolfSSL 3.15.3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wolfSSL 15:117db924cf7c 1 /* coding.h
wolfSSL 15:117db924cf7c 2 *
wolfSSL 15:117db924cf7c 3 * Copyright (C) 2006-2017 wolfSSL Inc.
wolfSSL 15:117db924cf7c 4 *
wolfSSL 15:117db924cf7c 5 * This file is part of wolfSSL.
wolfSSL 15:117db924cf7c 6 *
wolfSSL 15:117db924cf7c 7 * wolfSSL is free software; you can redistribute it and/or modify
wolfSSL 15:117db924cf7c 8 * it under the terms of the GNU General Public License as published by
wolfSSL 15:117db924cf7c 9 * the Free Software Foundation; either version 2 of the License, or
wolfSSL 15:117db924cf7c 10 * (at your option) any later version.
wolfSSL 15:117db924cf7c 11 *
wolfSSL 15:117db924cf7c 12 * wolfSSL is distributed in the hope that it will be useful,
wolfSSL 15:117db924cf7c 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
wolfSSL 15:117db924cf7c 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
wolfSSL 15:117db924cf7c 15 * GNU General Public License for more details.
wolfSSL 15:117db924cf7c 16 *
wolfSSL 15:117db924cf7c 17 * You should have received a copy of the GNU General Public License
wolfSSL 15:117db924cf7c 18 * along with this program; if not, write to the Free Software
wolfSSL 15:117db924cf7c 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
wolfSSL 15:117db924cf7c 20 */
wolfSSL 15:117db924cf7c 21
wolfSSL 15:117db924cf7c 22 /*!
wolfSSL 15:117db924cf7c 23 \file wolfssl/wolfcrypt/coding.h
wolfSSL 15:117db924cf7c 24 */
wolfSSL 15:117db924cf7c 25
wolfSSL 15:117db924cf7c 26 #ifndef WOLF_CRYPT_CODING_H
wolfSSL 15:117db924cf7c 27 #define WOLF_CRYPT_CODING_H
wolfSSL 15:117db924cf7c 28
wolfSSL 15:117db924cf7c 29 #include <wolfssl/wolfcrypt/types.h>
wolfSSL 15:117db924cf7c 30
wolfSSL 15:117db924cf7c 31 #ifdef __cplusplus
wolfSSL 15:117db924cf7c 32 extern "C" {
wolfSSL 15:117db924cf7c 33 #endif
wolfSSL 15:117db924cf7c 34
wolfSSL 15:117db924cf7c 35
wolfSSL 15:117db924cf7c 36 WOLFSSL_API int Base64_Decode(const byte* in, word32 inLen, byte* out,
wolfSSL 15:117db924cf7c 37 word32* outLen);
wolfSSL 15:117db924cf7c 38
wolfSSL 15:117db924cf7c 39 #if defined(OPENSSL_EXTRA) || defined(SESSION_CERTS) || defined(WOLFSSL_KEY_GEN) \
wolfSSL 15:117db924cf7c 40 || defined(WOLFSSL_CERT_GEN) || defined(HAVE_WEBSERVER) || !defined(NO_DSA)
wolfSSL 15:117db924cf7c 41 #ifndef WOLFSSL_BASE64_ENCODE
wolfSSL 15:117db924cf7c 42 #define WOLFSSL_BASE64_ENCODE
wolfSSL 15:117db924cf7c 43 #endif
wolfSSL 15:117db924cf7c 44 #endif
wolfSSL 15:117db924cf7c 45
wolfSSL 15:117db924cf7c 46
wolfSSL 15:117db924cf7c 47 #ifdef WOLFSSL_BASE64_ENCODE
wolfSSL 15:117db924cf7c 48 enum Escaped {
wolfSSL 15:117db924cf7c 49 WC_STD_ENC = 0, /* normal \n line ending encoding */
wolfSSL 15:117db924cf7c 50 WC_ESC_NL_ENC, /* use escape sequence encoding */
wolfSSL 15:117db924cf7c 51 WC_NO_NL_ENC /* no encoding at all */
wolfSSL 15:117db924cf7c 52 }; /* Encoding types */
wolfSSL 15:117db924cf7c 53
wolfSSL 15:117db924cf7c 54 /* encode isn't */
wolfSSL 15:117db924cf7c 55 WOLFSSL_API
wolfSSL 15:117db924cf7c 56 int Base64_Encode(const byte* in, word32 inLen, byte* out,
wolfSSL 15:117db924cf7c 57 word32* outLen);
wolfSSL 15:117db924cf7c 58 WOLFSSL_API
wolfSSL 15:117db924cf7c 59 int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out,
wolfSSL 15:117db924cf7c 60 word32* outLen);
wolfSSL 15:117db924cf7c 61 WOLFSSL_API
wolfSSL 15:117db924cf7c 62 int Base64_Encode_NoNl(const byte* in, word32 inLen, byte* out,
wolfSSL 15:117db924cf7c 63 word32* outLen);
wolfSSL 15:117db924cf7c 64 #endif
wolfSSL 15:117db924cf7c 65
wolfSSL 15:117db924cf7c 66 #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL) || \
wolfSSL 15:117db924cf7c 67 defined(HAVE_WEBSERVER) || defined(HAVE_FIPS) || \
wolfSSL 15:117db924cf7c 68 defined(HAVE_ECC_CDH) || defined(HAVE_SELFTEST) || \
wolfSSL 15:117db924cf7c 69 defined(WOLFSSL_ENCRYPTED_KEYS)
wolfSSL 15:117db924cf7c 70 #ifndef WOLFSSL_BASE16
wolfSSL 15:117db924cf7c 71 #define WOLFSSL_BASE16
wolfSSL 15:117db924cf7c 72 #endif
wolfSSL 15:117db924cf7c 73 #endif
wolfSSL 15:117db924cf7c 74
wolfSSL 15:117db924cf7c 75 #ifdef WOLFSSL_BASE16
wolfSSL 15:117db924cf7c 76 WOLFSSL_API
wolfSSL 15:117db924cf7c 77 int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen);
wolfSSL 15:117db924cf7c 78 WOLFSSL_API
wolfSSL 15:117db924cf7c 79 int Base16_Encode(const byte* in, word32 inLen, byte* out, word32* outLen);
wolfSSL 15:117db924cf7c 80 #endif
wolfSSL 15:117db924cf7c 81
wolfSSL 15:117db924cf7c 82
wolfSSL 15:117db924cf7c 83 #ifdef __cplusplus
wolfSSL 15:117db924cf7c 84 } /* extern "C" */
wolfSSL 15:117db924cf7c 85 #endif
wolfSSL 15:117db924cf7c 86
wolfSSL 15:117db924cf7c 87 #endif /* WOLF_CRYPT_CODING_H */
wolfSSL 15:117db924cf7c 88
wolfSSL 15:117db924cf7c 89