moonlight-ios/libs/OpenSSL.xcframework/ios-arm64/Headers/openssl/buffer.h

58 lines
1.6 KiB
C
Raw Normal View History

2020-03-27 21:24:32 -07:00
/*
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
*
2020-03-27 21:24:32 -07:00
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
2014-10-16 21:19:36 -04:00
*/
#ifndef HEADER_BUFFER_H
# define HEADER_BUFFER_H
2014-10-16 21:19:36 -04:00
# include <openssl/ossl_typ.h>
2020-03-27 21:24:32 -07:00
# ifndef HEADER_CRYPTO_H
# include <openssl/crypto.h>
# endif
# include <openssl/buffererr.h>
2014-10-16 21:19:36 -04:00
#ifdef __cplusplus
extern "C" {
#endif
# include <stddef.h>
2020-03-27 21:24:32 -07:00
# include <sys/types.h>
2014-10-16 21:19:36 -04:00
2020-03-27 21:24:32 -07:00
/*
* These names are outdated as of OpenSSL 1.1; a future release
* will move them to be deprecated.
*/
# define BUF_strdup(s) OPENSSL_strdup(s)
# define BUF_strndup(s, size) OPENSSL_strndup(s, size)
# define BUF_memdup(data, size) OPENSSL_memdup(data, size)
# define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size)
# define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size)
# define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen)
2014-10-16 21:19:36 -04:00
struct buf_mem_st {
size_t length; /* current number of bytes */
char *data;
size_t max; /* size of buffer */
2020-03-27 21:24:32 -07:00
unsigned long flags;
};
2014-10-16 21:19:36 -04:00
2020-03-27 21:24:32 -07:00
# define BUF_MEM_FLAG_SECURE 0x01
2014-10-16 21:19:36 -04:00
BUF_MEM *BUF_MEM_new(void);
2020-03-27 21:24:32 -07:00
BUF_MEM *BUF_MEM_new_ex(unsigned long flags);
void BUF_MEM_free(BUF_MEM *a);
2020-03-27 21:24:32 -07:00
size_t BUF_MEM_grow(BUF_MEM *str, size_t len);
size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
2014-10-16 21:19:36 -04:00
2020-03-27 21:24:32 -07:00
# ifdef __cplusplus
2014-10-16 21:19:36 -04:00
}
2020-03-27 21:24:32 -07:00
# endif
2014-10-16 21:19:36 -04:00
#endif