install go2rtc on bob
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package hkdf
|
||||
|
||||
import (
|
||||
"crypto/sha512"
|
||||
"io"
|
||||
|
||||
"golang.org/x/crypto/hkdf"
|
||||
)
|
||||
|
||||
func Sha512(key []byte, salt, info string) ([]byte, error) {
|
||||
r := hkdf.New(sha512.New, key, []byte(salt), []byte(info))
|
||||
|
||||
buf := make([]byte, 32)
|
||||
_, err := io.ReadFull(r, buf)
|
||||
|
||||
return buf, err
|
||||
}
|
||||
Reference in New Issue
Block a user