C API for BALTECH SDK

§ brp_set_crypto()

BRP_LIB brp_errcode brp_set_crypto ( brp_protocol  composite_protocol,
brp_protocol  crypto_protocol 
)

Assigns a crypto protocol to a composite protocol (protocol stack).

This is similar to the following call:

brp_set_layer(protocol, BRP_LAYERID_CRYPTO, crypto_protocol).

Attention: In contrary to brp_set_layer 'crypto_protocol' will be destroyed if this call fails for some reason (brp_destroy() must not be called in this case)!

Parameters
composite_protocolthe composite protocol, where a crypto
crypto_protocollayer shall be added to the crypto protocol that shall be layered on top of 'protocol'.