簡體   English   中英

使用 PHP,如何將加密文件發送到 .NET 腳本進行解密

[英]Using PHP, how to send an encrypted file to a .NET script for decryption

這是場景:

Trying to implement a single sign on intranet system, but there are mixed PHP and .NET scripts, I am the PHP guy, but the cookie was created and encrypted by a .NET scripte, I can't figure out how to decrypt the cookie using PHP , so I'm going to send the encrypted cookie to the .NET script for decryption, and then the .NET script will send me back the data with JSON, all using a https secured connection. 我想弄清楚將加密的 cookie 發送到 .NET 腳本的最佳方法是什么,我可以使用“GET”將加密的 cookie 作為字符串發送嗎?

如果加密的 cookie 是一個字符串並且相當短,那么只需使用 GET 在查詢字符串中發送它。 如果是二進制數據,則先base64_encode 如果數據很長,您可能希望改為使用 POST。

不過,您可能最好了解 .NET 代碼是如何解密的。 然后你可以在 PHP 中編寫你自己的解密。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM