@Test public void getPublicKey_checkValues() throws Exception { EcdsaPrivateKey privateKey = factory.createKey( createKeyFormat( HashType.SHA256, EllipticCurveType.NIST_P256, EcdsaSignatureEncoding.DER)); EcdsaPublicKey publicKey = manager.getPublicKey(privateKey); assertThat(publicKey).isEqualTo(privateKey.getPublicKey()); }
@Override public EcdsaPublicKey getPublicKey(EcdsaPrivateKey key) throws GeneralSecurityException { return key.getPublicKey(); }
EcdsaSignKeyManager extends PrivateKeyTypeManager<EcdsaPrivateKey, EcdsaPublicKey> { @Override public EcdsaPublicKey getPublicKey(EcdsaPrivateKey key) throws GeneralSecurityException { return key.getPublicKey(); } }
EcdsaSignKeyManager extends PrivateKeyTypeManager<EcdsaPrivateKey, EcdsaPublicKey> { @Override public EcdsaPublicKey getPublicKey(EcdsaPrivateKey key) throws GeneralSecurityException { return key.getPublicKey(); } EcdsaSignKeyManager(); }
EcdsaSignKeyManager extends PrivateKeyTypeManager<EcdsaPrivateKey, EcdsaPublicKey> { @Override public EcdsaPublicKey getPublicKey(EcdsaPrivateKey key) throws GeneralSecurityException { return key.getPublicKey(); } EcdsaSignKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override EcdsaPublicKey getPublicKey(EcdsaPrivateKey key); @Override KeyMaterialType keyMaterialType(); @Override EcdsaPrivateKey parseKey(ByteString byteString); @Override void validateKey(EcdsaPrivateKey privKey); @Override KeyFactory<EcdsaKeyFormat, EcdsaPrivateKey> keyFactory(); static void registerPair(boolean newKeyAllowed); static final KeyTemplate ecdsaP256Template(); static final KeyTemplate rawEcdsaP256Template(); static KeyTemplate createKeyTemplate(
      HashType hashType,
      EllipticCurveType curve,
      EcdsaSignatureEncoding encoding,
      KeyTemplate.OutputPrefixType prefixType); }
EcdsaSignKeyManager extends PrivateKeyTypeManager<EcdsaPrivateKey, EcdsaPublicKey> { @Override public EcdsaPublicKey getPublicKey(EcdsaPrivateKey key) throws GeneralSecurityException { return key.getPublicKey(); } EcdsaSignKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override EcdsaPublicKey getPublicKey(EcdsaPrivateKey key); @Override KeyMaterialType keyMaterialType(); @Override EcdsaPrivateKey parseKey(ByteString byteString); @Override void validateKey(EcdsaPrivateKey privKey); @Override KeyFactory<EcdsaKeyFormat, EcdsaPrivateKey> keyFactory(); static void registerPair(boolean newKeyAllowed); static final KeyTemplate ecdsaP256Template(); static final KeyTemplate rawEcdsaP256Template(); static KeyTemplate createKeyTemplate(
      HashType hashType,
      EllipticCurveType curve,
      EcdsaSignatureEncoding encoding,
      KeyTemplate.OutputPrefixType prefixType);  }