Documentation ¶
Overview ¶
Package subtle provides common methods needed in subtle implementations.
Index ¶
- func ComputeHKDF(hashAlg string, key []byte, salt []byte, info []byte, tagSize uint32) ([]byte, error)
- func ComputeHash(hashFunc func() hash.Hash, data []byte) ([]byte, error)
- func ConvertCurveName(name string) string
- func ConvertHashName(name string) string
- func GetCurve(curve string) elliptic.Curve
- func GetHashDigestSize(hash string) (uint32, error)
- func GetHashFunc(hash string) func() hash.Hash
- func NewBigIntFromHex(s string) (*big.Int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeHKDF ¶
func ComputeHKDF(hashAlg string, key []byte, salt []byte, info []byte, tagSize uint32) ([]byte, error)
ComputeHKDF extracts a pseudorandom key.
func ComputeHash ¶
ComputeHash calculates a hash of the given data using the given hash function.
func ConvertCurveName ¶
ConvertCurveName converts different forms of a curve name to the name that tink recognizes.
func ConvertHashName ¶
ConvertHashName converts different forms of a hash name to the hash name that tink recognizes.
func GetCurve ¶
GetCurve returns the curve object that corresponds to the given curve type. It returns null if the curve type is not supported.
func GetHashDigestSize ¶
GetHashDigestSize returns the digest size of the specified hash algorithm.
func GetHashFunc ¶
GetHashFunc returns the corresponding hash function of the given hash name.
Types ¶
This section is empty.