S2OPC OPCUA Toolkit
sopc_secret_buffer.h
Go to the documentation of this file.
1 /*
2  * Licensed to Systerel under one or more contributor license
3  * agreements. See the NOTICE file distributed with this work
4  * for additional information regarding copyright ownership.
5  * Systerel licenses this file to you under the Apache
6  * License, Version 2.0 (the "License"); you may not use this
7  * file except in compliance with the License. You may obtain
8  * a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
29 #ifndef SOPC_SECRET_BUFFER_H_
30 #define SOPC_SECRET_BUFFER_H_
31 
32 #include <stdint.h>
33 
34 // Types
36 typedef uint8_t SOPC_ExposedBuffer;
37 
38 /* ------------------------------------------------------------------------------------------------
39  * API
40  * ------------------------------------------------------------------------------------------------
41  */
42 
57 
66 
75 
82 
87 
101 
110 
123 
132 
133 #endif // SOPC_SECRET_BUFFER_H_
SOPC_SecretBuffer_NewFromFile
SOPC_SecretBuffer * SOPC_SecretBuffer_NewFromFile(const char *path)
Creates a new SecretBuffer from a file.
SOPC_SecretBuffer_Expose
const SOPC_ExposedBuffer * SOPC_SecretBuffer_Expose(const SOPC_SecretBuffer *sec)
Creates a ExposedBuffer from a SecretBuffer.
SOPC_SecretBuffer_GetLength
uint32_t SOPC_SecretBuffer_GetLength(const SOPC_SecretBuffer *sec)
Length of the SecretBuffer.
SOPC_SecretBuffer_Unexpose
void SOPC_SecretBuffer_Unexpose(const SOPC_ExposedBuffer *buf, const SOPC_SecretBuffer *sec)
Unexposes the buffer.
SOPC_SecretBuffer
struct SOPC_SecretBuffer SOPC_SecretBuffer
Definition: sopc_secret_buffer.h:35
SOPC_ExposedBuffer
uint8_t SOPC_ExposedBuffer
Definition: sopc_secret_buffer.h:36
SOPC_SecretBuffer_NewFromExposedBuffer
SOPC_SecretBuffer * SOPC_SecretBuffer_NewFromExposedBuffer(const SOPC_ExposedBuffer *buf, uint32_t len)
Creates a new SecretBuffer from an ExposedBuffer.
SOPC_SecretBuffer_New
SOPC_SecretBuffer * SOPC_SecretBuffer_New(uint32_t len)
Creates a new empty SecretBuffer.
SOPC_SecretBuffer_ExposeModify
SOPC_ExposedBuffer * SOPC_SecretBuffer_ExposeModify(SOPC_SecretBuffer *sec)
Creates a ExposedBuffer from a SecretBuffer for modification.
SOPC_SecretBuffer_DeleteClear
void SOPC_SecretBuffer_DeleteClear(SOPC_SecretBuffer *sec)
Clears the SecretBuffer from its secrets and frees it.
SOPC_SecretBuffer_UnexposeModify
void SOPC_SecretBuffer_UnexposeModify(SOPC_ExposedBuffer *buf, SOPC_SecretBuffer *sec)
Unexposes the buffer exposed for modification.