libraries/WM_Libraries/Platform/Common/crypto/wm_crypto_hard.c
int tls_crypto_rc4_init(psCipherContext_t * ctx, const unsigned char *key, u32 keylen)
{
	if(keylen != 16)
		return ERR_FAILURE;
	memcpy(ctx->arc4.state, key, keylen);
	ctx->arc4.byteCount = keylen;
	
	return ERR_CRY_OK;
}
/**
 * @brief          	This function initializes a RC4 encryption algorithm,  
 *				i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data. 
 *
 * @param[in]   	ctx 		Pointer to the Cipher Context. 
 * @param[in]   	key 		Pointer to the key. 
 * @param[in]   	keylen 	the length of key. 
 *
 * @retval  		0  		success 
 * @retval  		other   	failed  

 *
 * @note             	The first parameter ctx must be a structure which is allocated externally. 
 *      			And all of Context parameters in the initializing methods should be allocated externally too.
 */
@brief               This function initializes a RC4 encryption algorithm,
i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data.

@param[in]           ctx             Pointer to the Cipher Context.
@param[in]           key             Pointer to the key.
@param[in]           keylen  the length of key.

@retval              0               success
@retval              other           failed

@note                The first parameter ctx must be a structure which is allocated externally.
And all of Context parameters in the initializing methods should be allocated externally too.
@brief This function initializes a RC4 encryption algorithm i . e . fills the psCipherContext_t structure pointed to by ctx with necessary data . @param [ in ] ctx Pointer to the Cipher Context . @param [ in ] key Pointer to the key . @param [ in ] keylen the length of key . @retval 0 success @retval other failed @note The first parameter ctx must be a structure which is allocated externally . And all of Context parameters in the initializing methods should be allocated externally too .
int tls_crypto_rc4_init(psCipherContext_t * ctx, const unsigned char *key, u32 keylen)
{
	if(keylen != 16)
		return ERR_FAILURE;
	memcpy(ctx->arc4.state, key, keylen);
	ctx->arc4.byteCount = keylen;
	return ERR_CRY_OK;
}
int tls_crypto_rc4_init ( psCipherContext_t * ctx , const unsigned char * key , u32 keylen ) { if ( keylen != 16 ) return ERR_FAILURE ; memcpy ( ctx -> arc4 . state , key , keylen ) ; ctx -> arc4 . byteCount = keylen ; return ERR_CRY_OK ; }
@brief               This function initializes a RC4 encryption algorithm,
                              i.e.
@brief This function initializes a RC4 encryption algorithm i . e .