简体   繁体   中英

Lightweight encryption/decryption between c # and php

I am looking for a lightweight method of encrypting XML in php that my c# app will then be able to decrypt. It doesn't need to military strength, just enough to deter casual people from viewing the XML contents.

I've seen several methods online but they span 50+ lines of code and I'm trying to keep this nice and simple.

is there no built-in encryption/decryption methods that both php and c# share that require little more than encrypt($string,METHOD,$key) and decrypt($string, METHOD, $key) ?

I recommend PGP, here is how to do it in PHP: Encrypt files using PGP in PHP?

For C# you will likely use the BouncyCastle library.

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