@Test public void testKeyGenBadCrypto() throws CryptoException, IllegalAccessException, InstantiationException, ClassNotFoundException { thrown.expect(CryptoException.class); thrown.expectMessage("Unable to generate"); CryptoPrimitives tmpCrypto = new CryptoPrimitives(); tmpCrypto.keyGen(); }
@Override public KeyPair keyGen() throws CryptoException { return ecdsaKeyGen(); }
CryptoPrimitives implements CryptoSuite { @Override public KeyPair keyGen() throws CryptoException { return ecdsaKeyGen(); } }
CryptoPrimitives implements CryptoSuite { @Override public KeyPair keyGen() throws CryptoException { return ecdsaKeyGen(); } CryptoPrimitives(); }
CryptoPrimitives implements CryptoSuite { @Override public KeyPair keyGen() throws CryptoException { return ecdsaKeyGen(); } CryptoPrimitives(); Certificate bytesToCertificate(byte[] certBytes); PrivateKey bytesToPrivateKey(byte[] pemKey); @Override boolean verify(byte[] pemCertificate, String signatureAlgorithm, byte[] signature, byte[] plainText); KeyStore getTrustStore(); void addCACertificateToTrustStore(File caCertPem, String alias); void addCACertificateToTrustStore(byte[] bytes, String alias); @Override void loadCACertificates(Collection<Certificate> certificates); @Override void loadCACertificatesAsBytes(Collection<byte[]> certificatesBytes); @Override KeyPair keyGen(); @Override byte[] sign(PrivateKey key, byte[] data); String generateCertificationRequest(String subject, KeyPair pair); @Override byte[] hash(byte[] input); @Override CryptoSuiteFactory getCryptoSuiteFactory(); void init(); @Override Properties getProperties(); byte[] certificateToDER(String certificatePEM); }
CryptoPrimitives implements CryptoSuite { @Override public KeyPair keyGen() throws CryptoException { return ecdsaKeyGen(); } CryptoPrimitives(); Certificate bytesToCertificate(byte[] certBytes); PrivateKey bytesToPrivateKey(byte[] pemKey); @Override boolean verify(byte[] pemCertificate, String signatureAlgorithm, byte[] signature, byte[] plainText); KeyStore getTrustStore(); void addCACertificateToTrustStore(File caCertPem, String alias); void addCACertificateToTrustStore(byte[] bytes, String alias); @Override void loadCACertificates(Collection<Certificate> certificates); @Override void loadCACertificatesAsBytes(Collection<byte[]> certificatesBytes); @Override KeyPair keyGen(); @Override byte[] sign(PrivateKey key, byte[] data); String generateCertificationRequest(String subject, KeyPair pair); @Override byte[] hash(byte[] input); @Override CryptoSuiteFactory getCryptoSuiteFactory(); void init(); @Override Properties getProperties(); byte[] certificateToDER(String certificatePEM);  }