wickr-crypto-c

util.h
1 /*
2 * Copyright © 2012-2020 Wickr Inc. All rights reserved.
3 *
4 * This code is being released for EDUCATIONAL, ACADEMIC, AND CODE REVIEW PURPOSES
5 * ONLY. COMMERCIAL USE OF THE CODE IS EXPRESSLY PROHIBITED. For additional details,
6 * please see LICENSE
7 *
8 * THE CODE IS MADE AVAILABLE "AS-IS" AND WITHOUT ANY EXPRESS OR
9 * IMPLIED GUARANTEES AS TO FITNESS, MERCHANTABILITY, NON-
10 * INFRINGEMENT OR OTHERWISE. IT IS NOT BEING PROVIDED IN TRADE BUT ON
11 * A VOLUNTARY BASIS ON BEHALF OF THE AUTHOR’S PART FOR THE BENEFIT
12 * OF THE LICENSEE AND IS NOT MADE AVAILABLE FOR CONSUMER USE OR ANY
13 * OTHER USE OUTSIDE THE TERMS OF THIS LICENSE. ANYONE ACCESSING THE
14 * CODE SHOULD HAVE THE REQUISITE EXPERTISE TO SECURE THEIR SYSTEM
15 * AND DEVICES AND TO ACCESS AND USE THE CODE FOR REVIEW PURPOSES
16 * ONLY. LICENSEE BEARS THE RISK OF ACCESSING AND USING THE CODE. IN
17 * PARTICULAR, AUTHOR BEARS NO LIABILITY FOR ANY INTERFERENCE WITH OR
18 * ADVERSE EFFECT THAT MAY OCCUR AS A RESULT OF THE LICENSEE
19 * ACCESSING AND/OR USING THE CODE ON LICENSEE’S SYSTEM.
20 */
21
22 #ifndef util_h
23 #define util_h
24
25 #include "buffer.h"
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
46 wickr_buffer_t * getBase64FromData(const wickr_buffer_t * objData);
47
57 wickr_buffer_t * getDataFromBase64(const wickr_buffer_t * strBase64);
58
68 wickr_buffer_t * getHexStringFromData(const wickr_buffer_t *objData);
69
79 wickr_buffer_t * getDataFromHexString(const wickr_buffer_t *hexString);
80
81 #ifdef __cplusplus
82 }
83 #endif
84
85 #endif /* util_h */
getDataFromHexString
wickr_buffer_t * getDataFromHexString(const wickr_buffer_t *hexString)
getHexStringFromData
wickr_buffer_t * getHexStringFromData(const wickr_buffer_t *objData)
getDataFromBase64
wickr_buffer_t * getDataFromBase64(const wickr_buffer_t *strBase64)
getBase64FromData
wickr_buffer_t * getBase64FromData(const wickr_buffer_t *objData)
wickr_buffer
Represents an array of bytes and the length of the allocation associated with those bytes.
Definition: buffer.h:51