1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00
any-sync/common/pkg/acl/aclrecordproto/aclreadkeyderive.go
Sergey Cherepanov daa9bb1df0
move pkgs
2022-10-17 14:11:55 +03:00

12 lines
380 B
Go

package aclrecordproto
import (
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/util/keys/symmetric"
)
func ACLReadKeyDerive(signKey []byte, encKey []byte) (*symmetric.Key, error) {
concBuf := make([]byte, 0, len(signKey)+len(encKey))
concBuf = append(concBuf, signKey...)
concBuf = append(concBuf, encKey...)
return symmetric.DeriveFromBytes(concBuf)
}