@@ -44,16 +44,16 @@ to your specified host.
4444
4545*/
4646type Client struct {
47- AppID string
48- Key string
49- Secret string
50- Host string // host or host:port pair
51- Secure bool // true for HTTPS
52- Cluster string
53- HTTPClient * http.Client
54- EncryptionMasterKey string // deprecated
55- EncryptionMasterKeyBase64 string // for E2E
56- memoisedEncryptionMasterKey * []byte // parsed key for use
47+ AppID string
48+ Key string
49+ Secret string
50+ Host string // host or host:port pair
51+ Secure bool // true for HTTPS
52+ Cluster string
53+ HTTPClient * http.Client
54+ EncryptionMasterKey string // deprecated
55+ EncryptionMasterKeyBase64 string // for E2E
56+ validatedEncryptionMasterKey * []byte // parsed key for use
5757}
5858
5959/*
@@ -507,8 +507,8 @@ func (c *Client) Webhook(header http.Header, body []byte) (*Webhook, error) {
507507}
508508
509509func (c * Client ) encryptionMasterKey () ([]byte , error ) {
510- if c .memoisedEncryptionMasterKey != nil {
511- return * (c .memoisedEncryptionMasterKey ), nil
510+ if c .validatedEncryptionMasterKey != nil {
511+ return * (c .validatedEncryptionMasterKey ), nil
512512 }
513513
514514 if c .EncryptionMasterKey != "" && c .EncryptionMasterKeyBase64 != "" {
@@ -521,7 +521,7 @@ func (c *Client) encryptionMasterKey() ([]byte, error) {
521521 }
522522
523523 keyBytes := []byte (c .EncryptionMasterKey )
524- c .memoisedEncryptionMasterKey = & keyBytes
524+ c .validatedEncryptionMasterKey = & keyBytes
525525 return keyBytes , nil
526526 }
527527
@@ -534,7 +534,7 @@ func (c *Client) encryptionMasterKey() ([]byte, error) {
534534 return nil , errors .New ("EncryptionMasterKeyBase64 must encode 32 bytes" )
535535 }
536536
537- c .memoisedEncryptionMasterKey = & keyBytes
537+ c .validatedEncryptionMasterKey = & keyBytes
538538 return keyBytes , nil
539539 }
540540
0 commit comments