From 6e8ec0271b060281b30b3678ee511f653572eb9a Mon Sep 17 00:00:00 2001 From: Andrea Franz Date: Wed, 6 Mar 2019 10:41:22 +0100 Subject: [PATCH] rename KeyProvider struct to SCP02Keys --- globalplatform/scp02_keys.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/globalplatform/scp02_keys.go b/globalplatform/scp02_keys.go index 1d003e6..a72623e 100644 --- a/globalplatform/scp02_keys.go +++ b/globalplatform/scp02_keys.go @@ -1,24 +1,24 @@ package globalplatform -// KeyProvider is a struct that contains encoding and MAC keys used to communicate with smartcards. -type KeyProvider struct { +// SCP02Keys is a struct that contains encoding and MAC keys used to communicate with smartcards. +type SCP02Keys struct { enc []byte mac []byte } // Enc returns the enc key data. -func (k *KeyProvider) Enc() []byte { +func (k *SCP02Keys) Enc() []byte { return k.enc } // Mac returns the MAC key data. -func (k *KeyProvider) Mac() []byte { +func (k *SCP02Keys) Mac() []byte { return k.mac } -// NewKeyProvider returns a new KeyProvider with the specified ENC and MAC keys. -func NewKeyProvider(enc, mac []byte) *KeyProvider { - return &KeyProvider{ +// NewSCP02Keys returns a new SCP02Keys with the specified ENC and MAC keys. +func NewSCP02Keys(enc, mac []byte) *SCP02Keys { + return &SCP02Keys{ enc: enc, mac: mac, }