All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gov.loc.repository.bagit.hash.StandardSupportedAlgorithms Maven / Gradle / Ivy

Go to download

The BAGIT LIBRARY is a software library intended to support the creation, manipulation, and validation of bags. Its current version is 0.97. It is version aware with the earliest supported version being 0.93.

The newest version!
package gov.loc.repository.bagit.hash;

/**
 * The standard algorithms that are supported "out of the box" in bagit
 */
public enum StandardSupportedAlgorithms implements SupportedAlgorithm{
  MD5("MD5"),
  SHA1("SHA-1"),
  SHA224("SHA-224"),
  SHA256("SHA-256"),
  SHA512("SHA-512");

  private final String messageDigestName;
  
  private StandardSupportedAlgorithms(final String messageDigestName){
    this.messageDigestName = messageDigestName;
  }

  @Override
  public String getMessageDigestName() {
    return messageDigestName;
  }

  @SuppressWarnings({"PMD.UseLocaleWithCaseConversions"})
  @Override
  public String getBagitName() {
    return name().toLowerCase();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy