Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

New Developer
Posts: 35
Registered: ‎09-28-2013
My Device: Dev Alpha B
My Carrier: Movistar

Re: Hash MAC SHA256

Thanks. It is working fine now.


Is there any problem if I always use SB_HMAC_SHA256_256_TAG_LEN?

unsigned char message_digest_user_id[SB_HMAC_SHA256_256_TAG_LEN];


hu_HMACSHA256End(&hmacContext, SB_HMAC_SHA256_256_TAG_LEN, message_digest_user_id, globalCtx);


QByteArray password_hash_data = QByteArray::fromRawData(reinterpret_cast<const char *>(message_digest_user_id), SB_HMAC_SHA256_256_TAG_LEN);
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: Hash MAC SHA256

Hi, it's correct here, as you're asking for the output to be that size.
Rob is no longer associated with BlackBerry.