xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 4KB
    文件類型: .java
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-23
  • 語言: Java
  • 標簽: SM2Engine??

資源簡介

共享基于國密算法SM2加、解密相關代碼,有利于各程序員參考代碼實現SM2加解密(BC實現)。

資源截圖

代碼片段和文件信息

package?com.szca.test;

import?java.math.BigInteger;
import?java.security.SecureRandom;

import?szca.org.bouncycastle.crypto.AsymmetricCipherKeyPair;
import?szca.org.bouncycastle.crypto.engines.SM2Engine;
import?szca.org.bouncycastle.crypto.generators.ECKeyPairGenerator;
import?szca.org.bouncycastle.crypto.params.ECDomainParameters;
import?szca.org.bouncycastle.crypto.params.ECKeyGenerationParameters;
import?szca.org.bouncycastle.crypto.params.ECPrivateKeyParameters;
import?szca.org.bouncycastle.crypto.params.ECPublicKeyParameters;
import?szca.org.bouncycastle.crypto.params.ParametersWithRandom;
import?szca.org.bouncycastle.math.ec.ECCurve;
import?szca.org.bouncycastle.math.ec.ECPoint;
import?szca.org.bouncycastle.util.Arrays;
import?szca.org.bouncycastle.util.Strings;
import?szca.org.bouncycastle.util.test.SimpleTest;

public?class?SM2EngineTest?extends?SimpleTest
{
??public?String?getName()
??{
????return?“SM2Engine“;
??}

??private?void?doEngineTestFp()
????throws?Exception
??{
????BigInteger?p?=?new?BigInteger(“FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF“?16);
????BigInteger?a?=?new?BigInteger(“FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC“?16);
????BigInteger?b?=?new?BigInteger(“28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93“?16);
????BigInteger?n?=?new?BigInteger(“FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123“?16);
????BigInteger?x?=?new?BigInteger(“32C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7“?16);
????BigInteger?y?=?new?BigInteger(“BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0“?16);
????ECCurve.Fp?localFp?=?new?ECCurve.Fp(p?a?b);
????ECPoint?localECPoint?=?localFp.createPoint(x?y);
????ECDomainParameters?localECDomainParameters?=?new?ECDomainParameters(localFp?localECPoint?n);
????ECKeyPairGenerator?localECKeyPairGenerator?=?new?ECKeyPairGenerator();
????ECKeyGenerationParameters?localECKeyGenerationParameters?=?new?ECKeyGenerationParameters(localECDomainParameter

評論

共有 條評論

相關資源