Sha256: 38a2f44572d6e6efbf5188f040c63c92f6184d84499c5ccc86540e79726d2bb7

Contents?: true

Size: 418 Bytes

Versions: 16

Compression:

Stored size: 418 Bytes

Contents

package jose

import (
	"hash"
	"crypto"
	"crypto/sha256"
	"crypto/sha512"
)

func hashFunc(keySizeBits int) crypto.Hash {
	switch keySizeBits {
		case 256: return crypto.SHA256
		case 384: return crypto.SHA384
		 default: return crypto.SHA512
	}	
}

func hashAlg(keySizeBits int) hash.Hash {
	switch keySizeBits {
		case 256: return sha256.New()
		case 384: return sha512.New384()
		 default: return sha512.New()
	}
}

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ruby_snowflake_client-1.3.7 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.3.6 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.3.5 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.3.4 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.3.4.pre.debug ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.3.3.pre.debug ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.3.2 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.3.1 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.3.0 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.2.1 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.2.0 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.1.1 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.1.0 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.0.2 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.0.1 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go
ruby_snowflake_client-1.0.0 ext/vendor/github.com/dvsekhvalnov/jose2go/sha.go