Main Site Documentation

.Net mf Hmac support on G120?


#1

Hi.

Since there seems to be a problem regarding ssl (due to a memory leak) I need to use some other mechanism for creating integrity protection in my devices communication with an Api.

HMAC seems to be a good solution. Is this kind of hashing supported in .net mf 4.2 and if so. How do I use it? (There is a class named KeyedHashAlgorithm but I can’t find any examples on how to use it).


#2

Hi, thanks for the answer.

I’m using G120. There is more information regarding this in this post: https://www.ghielectronics.com/community/forum/topic?id=12989

I’ve looked in the documentation but having problems understanding how to setup the cryptokey objekt in the case of HMAC. All examples are for a RSA algorithm, like this one: https://www.ghielectronics.com/docs/111/crypto-aes

Do you have any example?


#3

Nevermind… I ended up wrinting my own HMAC implementation. It turned out that the algorithm was simple: http://en.wikipedia.org/wiki/HMAC#Design_principles.