Try BouncyCastle for C#. Check the feature list.
There is a WinRT-compatible version of BouncyCastle here, link provided by dbeachy1.
题
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?
解决方案
Try BouncyCastle for C#. Check the feature list.
There is a WinRT-compatible version of BouncyCastle here, link provided by dbeachy1.