type crypto.Hash
55 uses
crypto (current package)
crypto.go#L16: type Hash uint
crypto.go#L19: func (h Hash) HashFunc() Hash {
crypto.go#L23: func (h Hash) String() string {
crypto.go#L71: MD4 Hash = 1 + iota // import golang.org/x/crypto/md4
crypto.go#L127: func (h Hash) Size() int {
crypto.go#L138: func (h Hash) New() hash.Hash {
crypto.go#L149: func (h Hash) Available() bool {
crypto.go#L156: func RegisterHash(h Hash, f func() hash.Hash) {
crypto.go#L237: HashFunc() Hash
crypto.go#L274: type hashUnavailableError Hash
crypto.go#L277: return "crypto: requested hash function unavailable: " + Hash(h).String()
crypto/ecdsa
ecdsa.go#L458: func signFIPSDeterministic[P ecdsa.Point[P]](c *ecdsa.Curve[P], hashFunc crypto.Hash, priv *PrivateKey, hash []byte) ([]byte, error) {
crypto/ed25519
ed25519.go#L114: case hash == crypto.Hash(0) && context != "": // Ed25519ctx
ed25519.go#L119: case hash == crypto.Hash(0): // Ed25519
ed25519.go#L130: Hash crypto.Hash
ed25519.go#L138: func (o *Options) HashFunc() crypto.Hash { return o.Hash }
ed25519.go#L235: return VerifyWithOptions(publicKey, message, sig, &Options{Hash: crypto.Hash(0)}) == nil
ed25519.go#L260: case opts.Hash == crypto.Hash(0) && opts.Context != "": // Ed25519ctx
ed25519.go#L265: case opts.Hash == crypto.Hash(0): // Ed25519
crypto/internal/boring
notboring.go#L102: func SignRSAPKCS1v15(priv *PrivateKeyRSA, h crypto.Hash, hashed []byte) ([]byte, error) {
notboring.go#L105: func SignRSAPSS(priv *PrivateKeyRSA, h crypto.Hash, hashed []byte, saltLen int) ([]byte, error) {
notboring.go#L108: func VerifyRSAPKCS1v15(pub *PublicKeyRSA, h crypto.Hash, hashed, sig []byte) error {
notboring.go#L111: func VerifyRSAPSS(pub *PublicKeyRSA, h crypto.Hash, hashed, sig []byte, saltLen int) error {
crypto/mldsa
mldsa.go#L95: func (opts *Options) HashFunc() crypto.Hash {
crypto/rsa
fips.go#L41: Hash crypto.Hash
fips.go#L45: func (opts *PSSOptions) HashFunc() crypto.Hash {
fips.go#L65: func SignPSS(random io.Reader, priv *PrivateKey, hash crypto.Hash, digest []byte, opts *PSSOptions) ([]byte, error) {
fips.go#L137: func VerifyPSS(pub *PublicKey, hash crypto.Hash, digest []byte, sig []byte, opts *PSSOptions) error {
fips.go#L335: func SignPKCS1v15(random io.Reader, priv *PrivateKey, hash crypto.Hash, hashed []byte) ([]byte, error) {
fips.go#L337: if hash != crypto.Hash(0) {
fips.go#L380: func VerifyPKCS1v15(pub *PublicKey, hash crypto.Hash, hashed []byte, sig []byte) error {
fips.go#L382: if hash != crypto.Hash(0) {
rsa.go#L95: Hash crypto.Hash
rsa.go#L99: MGFHash crypto.Hash
crypto/tls
auth.go#L23: func verifyHandshakeSignature(sigType uint8, pubkey crypto.PublicKey, hashFunc crypto.Hash, signed, sig []byte) error {
auth.go#L82: func verifyLegacyHandshakeSignature(sigType uint8, pubkey crypto.PublicKey, hashFunc crypto.Hash, hashed, sig []byte) error {
auth.go#L135: func typeAndHashFromSignatureScheme(signatureAlgorithm SignatureScheme) (sigType uint8, hash crypto.Hash, err error) {
auth.go#L172: func legacyTypeAndHashFromPublicKey(pub crypto.PublicKey) (sigType uint8, hash crypto.Hash, err error) {
cipher_suites.go#L201: hash crypto.Hash
common.go#L228: var directSigning crypto.Hash = 0
handshake_server.go#L777: var sigHash crypto.Hash
handshake_server_tls13.go#L444: func cloneHash(in hash.Hash, h crypto.Hash) hash.Hash {
key_agreement.go#L338: var sigHash crypto.Hash
prf.go#L90: func prfAndHashForVersion(version uint16, suite *cipherSuite) (prfFunc, crypto.Hash) {
prf.go#L93: return prf10, crypto.Hash(0)
crypto/x509
x509.go#L257: func (algo SignatureAlgorithm) hashFunc() crypto.Hash {
x509.go#L263: return crypto.Hash(0)
x509.go#L382: hash crypto.Hash
x509.go#L400: {PureEd25519, "Ed25519", oidSignatureEd25519, emptyRawValue, Ed25519, crypto.Hash(0) /* no pre-hashing */, false},
x509.go#L401: {MLDSA44, "ML-DSA-44", oidPublicKeyMLDSA44, emptyRawValue, MLDSA, crypto.Hash(0) /* no pre-hashing */, false},
x509.go#L402: {MLDSA65, "ML-DSA-65", oidPublicKeyMLDSA65, emptyRawValue, MLDSA, crypto.Hash(0) /* no pre-hashing */, false},
x509.go#L403: {MLDSA87, "ML-DSA-87", oidPublicKeyMLDSA87, emptyRawValue, MLDSA, crypto.Hash(0) /* no pre-hashing */, false},
x509.go#L1056: var hashType crypto.Hash
x509.go#L1068: case crypto.Hash(0):