• 大小: 1.37MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-19
  • 语言: Java
  • 标签:

资源简介

android数据传输RSA加密DEMO

资源截图

代码片段和文件信息

package cn.itcast.constant;

/**
 * 
 * @author fy
 *  字符串类型的密钥对
 */
public class MyConstant {

/**
 *  一对测试密钥   1: 
 *  pubKey_String ---公钥
 *  pubKey_String ---私钥
 */
public static final String pubKey_String = “MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVRiDkEKXy/KBTe+UmkA+feq1zGWIgBxkgbz7aBJGb5+eMKKoiDRoEHzlGndwFKm4mQWNftuMOfNcogzYpGKSEfC7sqfBPDHsGPZixMWzL3J10zkMTWo6MDIXKKqMG1Pgeq1wENfJjcYSU/enYSZkg3rFTOaBSFId+rrPjPo7Y4wIDAQAB“;
public static final String priKey_String = “MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJVGIOQQpfL8oFN75SaQD596rXMZYiAHGSBvPtoEkZvn54woqiINGgQfOUad3AUqbiZBY1+24w581yiDNikYpIR8Luyp8E8MewY9mLExbMvcnXTOQxNajowMhcoqowbU+B6rXAQ18mNxhJT96dhJmSDesVM5oFIUh36us+M+jtjjAgMBAAECgYABtnxKIabF0wBD9Pf8KUsEmXPEDlaB55LyPFSMS+Ef2NlfUlgha+UQhwsxND6CEKqS5c0uG/se/2+4l0jXz+CTYBEh+USYB3gxcMKEo5XDFOGaM2Ncbc7FAKJIkYYN2DHmr4voSM5YkVibw5Lerw0kKdYyr0Xd0kmqTok3JLiLgQJBAOGZ1ao9oqWUzCKnpuTmXre8pZLmpWPhm6S1FU0vHjI0pZh/jusc8UXSRPnx1gLsgXq0ux30j968x/DmkESwxX8CQQCpY1+2p1aX2EzYO3UoTbBUTg7lCsopVNVf41xriek7XF1YyXOwEOSokp2SDQcRoKJ2PyPc2FJ/f54pigdsW0adAkAM8JTnydc9ZhZ7WmBhOrFuGnzoux/7ZaJWxSguoCg8OvbQk2hwJd3U4mWgbHWY/1XB4wHkivWBkhRpxd+6gOUjAkBH9qscS52zZzbGiwQsOk1Wk88qKdpXku4QDeUe3vmSuZwC85tNyu+KWrfM6/H74DYFbK/MzK7H8iz80uJye5jVAkAEqEB/LwlpXljFAxTID/SLZBb+bCIoV/kvg+2145F+CSSUjEWRhG/+OH0cQfqomfg36WrvHl0g/Xw06fg31HgK“;

/**
 *  测试密钥  2:  
 *  pubKey_String ---公钥
 *  pubKey_String ---私钥
 */
public static final String pubKey1 = “MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCokTtKtoiIT8/4dmC3qd0l6m5LWSKkZTeWHbTi7yZ0zHc3Y9PEdHu9LtdzVMJ6z+6kD09bY0lK31gVBBGDqC0pUum9ObqY6HRLHcoHqAT90bpL7+B1ufbLt3S8lJlhTXY9TL4i9i5mI43FrHKxR+c8OAJs0gILzd1x7K+KnQ1pBQIDAQAB“;

public static final String priKey1 = “MIIBNgIBADANBgkqhkiG9w0BAQEFAASCASAwggEcAgEAAoGBAKiRO0q2iIhPz/h2YLep3SXqbktZIqRlN5YdtOLvJnTMdzdj08R0e70u13NUwnrP7qQPT1tjSUrfWBUEEYOoLSlS6b05upjodEsdygeoBP3Rukvv4HW59su3dLyUmWFNdj1MviL2LmYjjcWscrFH5zw4AmzSAgvN3XHsr4qdDWkFAgEAAoGAaRXg+LrCcvgOlr51nQnwK+rxx1dSGVpgRN1QHwkn2Dh/ObCqHBbh7RZ+ig+VDisCgpRozHghAOQrbS6UHJeDTvRWQhvjSkPUKtzT5sVXdpFrQRhOBP2ucxGubZtYNUitm3ilObsT1YZf0OB+Ozs19FJidCgHS88tPsB/W+ukowECAQACAQACAQACAQACAQA=“;

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        434  2016-11-05 14:00  EncryptDemo\.classpath

     文件        387  2016-11-05 14:00  EncryptDemo\.project

     文件        635  2016-11-05 14:00  EncryptDemo\.settings\org.eclipse.jdt.core.prefs

     文件       2166  2016-11-05 15:59  EncryptDemo\bin\cn\itcast\constant\MyConstant.class

     文件       1571  2016-11-05 15:57  EncryptDemo\bin\cn\itcast\test\Mytest.class

     文件       2361  2016-11-05 15:50  EncryptDemo\bin\cn\itcast\test\WebTest.class

     文件       2477  2016-11-05 16:00  EncryptDemo\bin\cn\itcast\util\GenKeyFromString.class

     文件       5428  2016-11-05 16:00  EncryptDemo\bin\cn\itcast\util\RSAUtil.class

     文件    1663318  2016-11-04 20:19  EncryptDemo\lib\bcprov-jdk15-1.45.jar

     文件       7471  2016-11-04 21:55  EncryptDemo\lib\sun.misc.base64Decoder.jar

     文件       2186  2016-11-05 15:59  EncryptDemo\src\cn\itcast\constant\MyConstant.java

     文件       1286  2016-11-05 15:57  EncryptDemo\src\cn\itcast\test\Mytest.java

     文件       1758  2016-11-05 15:50  EncryptDemo\src\cn\itcast\test\WebTest.java

     文件       2292  2016-11-05 16:00  EncryptDemo\src\cn\itcast\util\GenKeyFromString.java

     文件       7418  2016-11-05 16:00  EncryptDemo\src\cn\itcast\util\RSAUtil.java

     目录          0  2016-11-05 14:02  EncryptDemo\bin\cn\itcast\constant

     目录          0  2016-11-05 15:30  EncryptDemo\bin\cn\itcast\test

     目录          0  2016-11-05 14:04  EncryptDemo\bin\cn\itcast\util

     目录          0  2016-11-05 14:02  EncryptDemo\src\cn\itcast\constant

     目录          0  2016-11-05 15:30  EncryptDemo\src\cn\itcast\test

     目录          0  2016-11-05 14:04  EncryptDemo\src\cn\itcast\util

     目录          0  2016-11-05 14:02  EncryptDemo\bin\cn\itcast

     目录          0  2016-11-05 14:02  EncryptDemo\src\cn\itcast

     目录          0  2016-11-05 14:01  EncryptDemo\bin\cn

     目录          0  2016-11-05 14:01  EncryptDemo\src\cn

     目录          0  2016-11-05 14:00  EncryptDemo\.settings

     目录          0  2016-11-05 14:01  EncryptDemo\bin

     目录          0  2016-11-05 14:00  EncryptDemo\lib

     目录          0  2016-11-05 14:01  EncryptDemo\src

     目录          0  2016-11-05 14:00  EncryptDemo

............此处省略3个文件信息

评论

共有 条评论

相关资源