Question

Is there a .NET API that supports CAST encryption for Metro/WinRT? Something equivalent to this CommonCrypto call on iOS:

CCCrypt((mode == KeyEncryptionDecrypt) ? kCCDecrypt : kCCEncrypt, kCCAlgorithmCAST, 0,
          keyBuff, keySize,
          initVector,
          decryptData, decryptSize,
          buffer, bufferSize,
          dataOutSize);

From reading through the docs for the Windows 8 SymmetricKeyAlgorithmProvider class I don't see support for CAST. I investigated using OpenSSL (I can call C++ from my C# Metro app), but the OpenSSL library makes some desktop API calls from its randomization functions and so it wouldn't link under Metro. Is there a way to use CAST encryption from my C# Metro app?

Was it helpful?

Solution

Try BouncyCastle for C#. Check the feature list.

There is a WinRT-compatible version of BouncyCastle here, link provided by dbeachy1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top