func NewDigestFromHex(alg, hex string) Digest {
	return NewDigestFromEncoded(Algorithm(alg), hex)
}
NewDigestFromHex is deprecated. Please use NewDigestFromEncoded.
package digest
import (
	"fmt"
	"hash"
	"io"
	"regexp"
	"strings"
)
type Digest string
func NewDigest(alg Algorithm, h hash.Hash) Digest {
	return NewDigestFromBytes(alg, h.Sum(nil))
}
func NewDigestFromBytes(alg Algorithm, p []byte) Digest {
	return NewDigestFromEncoded(alg, alg.Encode(p))
}