class KeyManagerImpl implements KeyManager<PrimitiveT> {

  @Override
  public final MessageLite newKey(ByteString serializedKeyFormat) throws GeneralSecurityException {
    try {
      return keyFactoryHelper().parseValidateCreate(serializedKeyFormat);
    } catch (InvalidProtocolBufferException e) {
      throw new GeneralSecurityException(
          "Failures parsing proto of type "
              + keyTypeManager.keyFactory().getKeyFormatClass().getName(),
          e);
    }
  }

  public  KeyManagerImpl(
      KeyTypeManager<KeyProtoT> keyTypeManager, Class<PrimitiveT> primitiveClass);

}