Where is the CryptoCommon class in xamarin

I am trying to use the CryptoCommon class but cannot find it in the monotuch assembly.

I found the Mono.Security.Cryptography assembly, does it have the same performance as the CryptoCommon class?

Thank!!

+3
source share
1 answer

CommonCrypto is used internally inside Xamarin.iOS, it is not something superfluous - that is, there is no need for choice or rejection.

This means that it uses completely transparent to your code. If the algorithm is available in CommonCrypto, then it uses the classic .NET type.

eg.

// this will use CommonCrypto. AES is supported by CommonCrypto
// if your device supports it AES can be hardware accelerated
var aes = Aes.Create (); 

// this will also use CommonCrypto. SHA-1 is supported by CommonCrypto
// if your device supports it SHA-1 can be hardware accelerated
var sha = new SHA1Managed (); 

// this will not use CommonCrypto since the algorithm is not supported by Apple
var r = RIPEMD160.Create (); 

More information about CommonCrypto can be found on my blog.

+1

All Articles