Browse Source

remove invalid imports and a main function

tags/1.0.0
zhanglin33 5 years ago
parent
commit
a1a7cf9615
2 changed files with 0 additions and 20 deletions
  1. +0
    -14
      source/crypto/crypto-classic/src/test/java/test/com/jd/blockchain/crypto/service/classic/ED25519SignatureFunctionTest.java
  2. +0
    -6
      source/crypto/crypto-classic/src/test/java/test/com/jd/blockchain/crypto/utils/classic/RSAUtilsTest.java

+ 0
- 14
source/crypto/crypto-classic/src/test/java/test/com/jd/blockchain/crypto/service/classic/ED25519SignatureFunctionTest.java View File

@@ -34,20 +34,6 @@ import com.jd.blockchain.utils.io.BytesUtils;
*/ */
public class ED25519SignatureFunctionTest { public class ED25519SignatureFunctionTest {


public static void main(String[] args) {
// Generate and output some public keys for test;
SignatureFunction signFunc = Crypto.getSignatureFunction("ED25519");
AsymmetricKeypair kp1 = signFunc.generateKeypair();
System.out.println("kp1.pubKey=[" + kp1.getPubKey().toBase58() + "]");
System.out.println("kp1.privKey=[" + kp1.getPrivKey().toBase58() + "]");
AsymmetricKeypair kp2 = signFunc.generateKeypair();
System.out.println("kp1.pubKey=[" + kp2.getPubKey().toBase58() + "]");
System.out.println("kp1.privKey=[" + kp2.getPrivKey().toBase58() + "]");

}

@Test @Test
public void getAlgorithmTest() { public void getAlgorithmTest() {




+ 0
- 6
source/crypto/crypto-classic/src/test/java/test/com/jd/blockchain/crypto/utils/classic/RSAUtilsTest.java View File

@@ -1,22 +1,16 @@
package test.com.jd.blockchain.crypto.utils.classic; package test.com.jd.blockchain.crypto.utils.classic;


import com.jd.blockchain.crypto.utils.classic.RSAUtils; import com.jd.blockchain.crypto.utils.classic.RSAUtils;
import org.bouncycastle.asn1.DERNull;
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
import org.bouncycastle.crypto.AsymmetricCipherKeyPair; import org.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.bouncycastle.crypto.params.AsymmetricKeyParameter; import org.bouncycastle.crypto.params.AsymmetricKeyParameter;
import org.bouncycastle.crypto.params.RSAKeyParameters; import org.bouncycastle.crypto.params.RSAKeyParameters;
import org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters; import org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters;
import org.bouncycastle.jcajce.provider.asymmetric.util.KeyUtil;
import org.bouncycastle.util.encoders.Hex;
import org.junit.Test; import org.junit.Test;


import javax.crypto.BadPaddingException; import javax.crypto.BadPaddingException;
import javax.crypto.Cipher; import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException; import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException; import javax.crypto.NoSuchPaddingException;
import java.io.IOException;
import java.security.*; import java.security.*;
import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey; import java.security.interfaces.RSAPublicKey;


Loading…
Cancel
Save