小编Ran*_*nju的帖子

PHP等效于Java Triple DES加密/解密

我试图使用PHP mcrypt函数解密由Java Triple DES函数加密的密钥,但没有运气.在下面找到java代码

import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;


public class Encrypt3DES {

     private byte[] key;
     private byte[] initializationVector;

    public Encrypt3DES(){

    }

    public String encryptText(String plainText, String key) throws Exception{

         //----  Use specified 3DES key and IV from other source --------------
        byte[] plaintext = plainText.getBytes();
        byte[] myIV = key.getBytes();
        byte[] tdesKeyData = {(byte)0xA2, (byte)0x15, (byte)0x37, (byte)0x08, (byte)0xCA, (byte)0x62,
        (byte)0xC1, (byte)0xD2, (byte)0xF7, (byte)0xF1, (byte)0x93, (byte)0xDF,
        (byte)0xD2, (byte)0x15, (byte)0x4F, (byte)0x79, (byte)0x06, (byte)0x67,
        (byte)0x7A, (byte)0x82, (byte)0x94, (byte)0x16, (byte)0x32, (byte)0x95};

        Cipher c3des = …
Run Code Online (Sandbox Code Playgroud)

php java 3des tripledes

6
推荐指数
1
解决办法
9664
查看次数

c#从HttpClient的模型对象构建URL编码查询

需要从HttpClient的模型对象构建URL编码查询

我的模型是

class SaveProfileRequest
{
    public string gName { get; set; }
    public string gEmail { get; set; }
    public long gContact { get; set; }
    public string gCompany { get; set; }
    public string gDeviceID { get; set; }
    public string Organization { get; set; }
    public string profileImage { get; set; }
    public string documentImagefront { get; set; }
    public string documentImageback { get; set; }
}

SaveProfileRequest request = new SaveProfileRequest() { gName = name, gEmail = …
Run Code Online (Sandbox Code Playgroud)

c# dotnet-httpclient

3
推荐指数
3
解决办法
4483
查看次数

标签 统计

3des ×1

c# ×1

dotnet-httpclient ×1

java ×1

php ×1

tripledes ×1