Strophe 0.14
XMPP client library
scram.h File Reference

SCRAM helper functions. More...

Data Structures

struct  hash_alg

Macros

#define SCRAM_DIGEST_SIZE   SHA512_DIGEST_SIZE

Functions

int SCRAM_ClientKey (const struct hash_alg *alg, const uint8_t *password, size_t len, const uint8_t *salt, size_t salt_len, uint32_t i, uint8_t *key)
 Compute the SCRAM ClientKey.
void SCRAM_ClientSignature (const struct hash_alg *alg, const uint8_t *ClientKey, const uint8_t *AuthMessage, size_t len, uint8_t *sign)
void SCRAM_ClientProof (const struct hash_alg *alg, const uint8_t *ClientKey, const uint8_t *ClientSignature, uint8_t *proof)

Variables

const struct hash_alg * scram_algs []
const size_t scram_algs_num

Detailed Description

SCRAM helper functions.

Macro Definition Documentation

◆ SCRAM_DIGEST_SIZE

#define SCRAM_DIGEST_SIZE   SHA512_DIGEST_SIZE

Function Documentation

◆ SCRAM_ClientKey()

int SCRAM_ClientKey ( const struct hash_alg * alg,
const uint8_t * password,
size_t len,
const uint8_t * salt,
size_t salt_len,
uint32_t i,
uint8_t * key )

Compute the SCRAM ClientKey.

Returns
0 on success, -1 if the salt is too long to be processed. 'key' is left untouched in the error case.

◆ SCRAM_ClientSignature()

void SCRAM_ClientSignature ( const struct hash_alg * alg,
const uint8_t * ClientKey,
const uint8_t * AuthMessage,
size_t len,
uint8_t * sign )

◆ SCRAM_ClientProof()

void SCRAM_ClientProof ( const struct hash_alg * alg,
const uint8_t * ClientKey,
const uint8_t * ClientSignature,
uint8_t * proof )

Variable Documentation

◆ scram_algs

const struct hash_alg* scram_algs[]
extern

◆ scram_algs_num

const size_t scram_algs_num
extern