public String getHash() {
    return hash;
  }
Creates a new instance from a valid digest string.

@param digest the digest to generate the {@link DescriptorDigest} from
@return a new {@link DescriptorDigest} created from the digest
@throws DigestException if the digest is invalid
jib-core/src/main/java/com/google/cloud/tools/jib/api/DescriptorDigest.java