Commit 1f490c93 authored by Ben Sartor's avatar Ben Sartor Committed by johan

selectCommonAlgo now is a global function

Signed-off-by: johan's avatarJohan Pascal <johan.pascal@belledonne-communications.com>
parent 1b90ff13
......@@ -122,6 +122,21 @@ int crypoAlgoAgreement(bzrtpContext_t *zrtpContext, bzrtpChannelContext_t *zrtpC
*/
int updateCryptoFunctionPointers(bzrtpChannelContext_t *zrtpChannelContext);
/**
* @brief Select common algorithm from the given array where algo are represented by their 4 chars string defined in rfc section 5.1.2 to 5.1.6
* Master array is the one given the preference order
* All algo are designed by their uint8_t mapped values
*
* @param[in] masterArray The ordered available algo, result will follow this ordering
* @param[in] masterArrayLength Number of valids element in the master array
* @param[in] slaveArray The available algo, order is not taken in account
* @param[in] slaveArrayLength Number of valids element in the slave array
* @param[out] commonArray The available algo, order is not taken in account
*
* @return the number of common algorithm found
*/
uint8_t selectCommonAlgo(uint8_t masterArray[7], uint8_t masterArrayLength, uint8_t slaveArray[7], uint8_t slaveArrayLength, uint8_t commonArray[7]);
/**
* @brief Map the string description of algo type to an int defined in cryptoWrapper.h
*
......
......@@ -32,9 +32,6 @@
#include "cryptoUtils.h"
#include "cryptoWrapper.h"
/* local function prototype */
uint8_t selectCommonAlgo(uint8_t masterArray[7], uint8_t masterArrayLength, uint8_t slaveArray[7], uint8_t slaveArrayLength, uint8_t commonArray[7]);
int bzrtp_keyDerivationFunction(uint8_t *key, uint16_t keyLength,
uint8_t *label, uint16_t labelLength,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment