S2OPC OPCUA Toolkit
sopc_hash_based_crypto.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 
30 #ifndef SOPC_HASH_BASED_CRYPTO_H_
31 #define SOPC_HASH_BASED_CRYPTO_H_
32 
33 #include "sopc_builtintypes.h"
34 #include "sopc_enums.h"
35 #include "sopc_mem_alloc.h"
36 #include "sopc_secret_buffer.h"
37 
42 {
45 
50 
62 
69 
83  const SOPC_ByteString* pSalt,
84  size_t iteration_count,
85  size_t lenOutput);
86 
107  const SOPC_ByteString* pSecret,
108  SOPC_ByteString** ppOutput);
109 
110 #endif /* SOPC_HASH_BASED_CRYPTO_H_ */
SOPC_HashBasedCrypto_Run
SOPC_ReturnStatus SOPC_HashBasedCrypto_Run(const SOPC_HashBasedCrypto_Config *config, const SOPC_ByteString *pSecret, SOPC_ByteString **ppOutput)
Function that allows to execute a hashing mechanism.
SOPC_HashBasedCrypto_Config_Create
SOPC_ReturnStatus SOPC_HashBasedCrypto_Config_Create(SOPC_HashBasedCrypto_Config **cfg)
Create the internal configuration structure.
SOPC_HashBasedCrypto_Algo
SOPC_HashBasedCrypto_Algo
Defines the supported algorithms for user authentication.
Definition: sopc_hash_based_crypto.h:42
sopc_enums.h
SOPC_HashBasedCrypto_Config
struct SOPC_HashBasedCrypto_Config SOPC_HashBasedCrypto_Config
cryptographic structure to configure the algorithm used.
Definition: sopc_hash_based_crypto.h:49
sopc_builtintypes.h
SOPC_HashBasedCrypto_Config_Free
void SOPC_HashBasedCrypto_Config_Free(SOPC_HashBasedCrypto_Config *cfg)
Free the internal configuration.
SOPC_String
This structure provides string encapsulation.
Definition: sopc_builtintypes.h:149
SOPC_HashBasedCrypto_Config_PBKDF2
SOPC_ReturnStatus SOPC_HashBasedCrypto_Config_PBKDF2(SOPC_HashBasedCrypto_Config *config, const SOPC_ByteString *pSalt, size_t iteration_count, size_t lenOutput)
Fills the configuration structure for SOPC_HashBasedCrypto_PBKDF2_HMAC_SHA256 algorithm.
sopc_mem_alloc.h
S2OPC memory allocation wrappers.
SOPC_HashBasedCrypto_PBKDF2_HMAC_SHA256
@ SOPC_HashBasedCrypto_PBKDF2_HMAC_SHA256
Definition: sopc_hash_based_crypto.h:43
sopc_secret_buffer.h
SecretBuffer (mangled key) and ExposedBuffer (contiguous deciphered buffered) APIs.
SOPC_ReturnStatus
SOPC_ReturnStatus
Definition: libs2opc_client.h:64