func (k *symKeyMaterial) UnprotectCommand(protected []byte) ([]byte, error) {
	return e4crypto.UnprotectSymKey(protected, k.Key)
}
UnprotectCommand attempts to decrypt a client command from given protected cipher,
using the material's key
package keys
import (
	"encoding/json"
	"fmt"
	e4crypto "github.com/teserakt-io/e4go/crypto"
)
type SymKeyMaterial interface {
	KeyMaterial
}
type symKeyMaterial struct {
	Key []byte `json:"key,omitempty"`
}
var _ SymKeyMaterial = (*symKeyMaterial)(nil)
func NewSymKeyMaterial(key []byte) (SymKeyMaterial, error) {
	if err := e4crypto.ValidateSymKey(key); err != nil {
		return nil, fmt.Errorf("failed to validate sym key: %v", err)
	}
	s := &symKeyMaterial{}
	s.Key = make([]byte, len(key))
	copy(s.Key, key)
	return s, nil
}
func NewRandomSymKeyMaterial() (SymKeyMaterial, error) {
	return NewSymKeyMaterial(e4crypto.RandomKey())
}
func (k *symKeyMaterial) ProtectMessage(payload []byte, topicKey TopicKey) ([]byte, error) {
	protected, err := e4crypto.ProtectSymKey(payload, topicKey)
	if err != nil {
		return nil, err
	}
	return protected, nil
}