简体   繁体   中英

Using CAST encryption in a C# Metro/WinRT app

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM