package io.github.thankpoint.security.impl;

import java.security.Provider;
import java.security.Security;

import io.github.thankpoint.security.api.provider.SecurityProviderBuilder;

/**
 * Implementation of {@link SecurityProviderBuilder}.
 *
 * @param <B> type of the returned builder.
 * @author thks
 */
public interface AbstractSecurityProviderBuilderImpl<B> extends SecurityProviderBuilder<B> {

  @Override
  default B provider() {

    return provider((Provider) null);
  }

  @Override
  default B provider(String name) {

    return provider(Security.getProvider(name));
  }

}
