Skip to content

Commit cb11d25

Browse files
committed
Rename Hmac to HMAC
1 parent a6ea0e8 commit cb11d25

19 files changed

+120
-120
lines changed

auth/peer_test.go

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ func CreatePeerPair(t *testing.T) (*Peer, *Peer, *wallet.MockWallet, *wallet.Moc
128128
hmacBytes[i] = byte(i)
129129
}
130130

131-
aliceWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
132-
return &wallet.CreateHmacResult{Hmac: hmacBytes}, nil
131+
aliceWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
132+
return &wallet.CreateHMACResult{Hmac: hmacBytes}, nil
133133
}
134-
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
135-
return &wallet.CreateHmacResult{Hmac: hmacBytes}, nil
134+
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
135+
return &wallet.CreateHMACResult{Hmac: hmacBytes}, nil
136136
}
137137

138138
aliceWallet.MockDecrypt = func(ctx context.Context, args wallet.DecryptArgs, originator string) (*wallet.DecryptResult, error) {
@@ -553,11 +553,11 @@ func TestPeerCertificateExchange(t *testing.T) {
553553
hmacBytes[i] = byte(i)
554554
}
555555

556-
aliceWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
557-
return &wallet.CreateHmacResult{Hmac: hmacBytes}, nil
556+
aliceWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
557+
return &wallet.CreateHMACResult{Hmac: hmacBytes}, nil
558558
}
559-
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
560-
return &wallet.CreateHmacResult{Hmac: hmacBytes}, nil
559+
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
560+
return &wallet.CreateHMACResult{Hmac: hmacBytes}, nil
561561
}
562562

563563
// Set up transport with logging
@@ -765,11 +765,11 @@ func TestPeerMultiDeviceAuthentication(t *testing.T) {
765765
hmacBytes1[i] = byte(i)
766766
}
767767

768-
aliceWallet1.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
769-
return &wallet.CreateHmacResult{Hmac: hmacBytes1}, nil
768+
aliceWallet1.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
769+
return &wallet.CreateHMACResult{Hmac: hmacBytes1}, nil
770770
}
771-
aliceWallet2.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
772-
return &wallet.CreateHmacResult{Hmac: hmacBytes1}, nil
771+
aliceWallet2.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
772+
return &wallet.CreateHMACResult{Hmac: hmacBytes1}, nil
773773
}
774774

775775
aliceWallet1.MockDecrypt = func(ctx context.Context, args wallet.DecryptArgs, originator string) (*wallet.DecryptResult, error) {
@@ -802,8 +802,8 @@ func TestPeerMultiDeviceAuthentication(t *testing.T) {
802802
hmacBytes2[i] = byte(i)
803803
}
804804

805-
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
806-
return &wallet.CreateHmacResult{Hmac: hmacBytes2}, nil
805+
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
806+
return &wallet.CreateHMACResult{Hmac: hmacBytes2}, nil
807807
}
808808
bobWallet.MockDecrypt = func(ctx context.Context, args wallet.DecryptArgs, originator string) (*wallet.DecryptResult, error) {
809809
return &wallet.DecryptResult{Plaintext: []byte("decrypted")}, nil
@@ -1039,11 +1039,11 @@ func TestPartialCertificateAcceptance(t *testing.T) {
10391039
hmacBytes[i] = byte(i)
10401040
}
10411041

1042-
aliceWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
1043-
return &wallet.CreateHmacResult{Hmac: hmacBytes}, nil
1042+
aliceWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
1043+
return &wallet.CreateHMACResult{Hmac: hmacBytes}, nil
10441044
}
1045-
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
1046-
return &wallet.CreateHmacResult{Hmac: hmacBytes}, nil
1045+
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
1046+
return &wallet.CreateHMACResult{Hmac: hmacBytes}, nil
10471047
}
10481048

10491049
// Create mocked transports
@@ -1317,11 +1317,11 @@ func TestLibraryCardVerification(t *testing.T) {
13171317
hmacBytes[i] = byte(i)
13181318
}
13191319

1320-
aliceWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
1321-
return &wallet.CreateHmacResult{Hmac: hmacBytes}, nil
1320+
aliceWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
1321+
return &wallet.CreateHMACResult{Hmac: hmacBytes}, nil
13221322
}
1323-
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
1324-
return &wallet.CreateHmacResult{Hmac: hmacBytes}, nil
1323+
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
1324+
return &wallet.CreateHMACResult{Hmac: hmacBytes}, nil
13251325
}
13261326

13271327
// Create mocked transports
@@ -1639,11 +1639,11 @@ func TestNonmatchingCertificateRejection(t *testing.T) {
16391639
for i := range hmacBytes {
16401640
hmacBytes[i] = byte(i)
16411641
}
1642-
aliceWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
1643-
return &wallet.CreateHmacResult{Hmac: hmacBytes}, nil
1642+
aliceWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
1643+
return &wallet.CreateHMACResult{Hmac: hmacBytes}, nil
16441644
}
1645-
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
1646-
return &wallet.CreateHmacResult{Hmac: hmacBytes}, nil
1645+
bobWallet.MockCreateHmac = func(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
1646+
return &wallet.CreateHMACResult{Hmac: hmacBytes}, nil
16471647
}
16481648

16491649
// Setup transports

auth/utils/completed_proto_wallet.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ func (c *CompletedProtoWallet) GetHeaderForHeight(ctx context.Context, args wall
131131
}
132132

133133
// CreateHmac delegates to the embedded ProtoWallet
134-
func (c *CompletedProtoWallet) CreateHmac(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
135-
return c.ProtoWallet.CreateHmac(ctx, args, originator)
134+
func (c *CompletedProtoWallet) CreateHMAC(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
135+
return c.ProtoWallet.CreateHMAC(ctx, args, originator)
136136
}
137137

138138
// VerifyHmac delegates to the embedded ProtoWallet
139-
func (c *CompletedProtoWallet) VerifyHmac(ctx context.Context, args wallet.VerifyHmacArgs, originator string) (*wallet.VerifyHmacResult, error) {
140-
return c.ProtoWallet.VerifyHmac(ctx, args, originator)
139+
func (c *CompletedProtoWallet) VerifyHMAC(ctx context.Context, args wallet.VerifyHMACArgs, originator string) (*wallet.VerifyHMACResult, error) {
140+
return c.ProtoWallet.VerifyHMAC(ctx, args, originator)
141141
}
142142

143143
// CreateSignature delegates to the embedded ProtoWallet

auth/utils/create_nonce.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ func CreateNonce(ctx context.Context, w wallet.KeyOperations, counterparty walle
1919
return "", fmt.Errorf("failed to generate random bytes: %w", err)
2020
}
2121

22-
// Create encryption arguments for the wallet's CreateHmac function
23-
args := wallet.CreateHmacArgs{
22+
// Create encryption arguments for the wallet's CreateHMAC function
23+
args := wallet.CreateHMACArgs{
2424
EncryptionArgs: wallet.EncryptionArgs{
2525
ProtocolID: wallet.Protocol{
2626
SecurityLevel: wallet.SecurityLevelEveryApp,
@@ -33,7 +33,7 @@ func CreateNonce(ctx context.Context, w wallet.KeyOperations, counterparty walle
3333
}
3434

3535
// Create an HMAC for the random data using the wallet's key
36-
hmac, err := w.CreateHmac(ctx, args, "")
36+
hmac, err := w.CreateHMAC(ctx, args, "")
3737
if err != nil {
3838
return "", fmt.Errorf("failed to create HMAC: %w", err)
3939
}

auth/utils/verify_nonce.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ func VerifyNonce(
3232
data := nonceBytes[:16]
3333
hmac := nonceBytes[16:]
3434

35-
// Create args for wallet VerifyHmac
36-
args := wallet.VerifyHmacArgs{
35+
// Create args for wallet VerifyHMAC
36+
args := wallet.VerifyHMACArgs{
3737
EncryptionArgs: wallet.EncryptionArgs{
3838
ProtocolID: wallet.Protocol{
3939
SecurityLevel: wallet.SecurityLevelEveryApp,
@@ -47,7 +47,7 @@ func VerifyNonce(
4747
}
4848

4949
// Verify the hmac
50-
result, err := w.VerifyHmac(ctx, args, "")
50+
result, err := w.VerifyHMAC(ctx, args, "")
5151
if err != nil {
5252
return false, fmt.Errorf("failed to verify HMAC: %w", err)
5353
}

registry/mock.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ func (m *MockRegistry) Decrypt(ctx context.Context, args wallet.DecryptArgs, ori
107107
return nil, nil
108108
}
109109

110-
func (m *MockRegistry) CreateHmac(ctx context.Context, args wallet.CreateHmacArgs, originator string) (*wallet.CreateHmacResult, error) {
111-
require.Fail(m.T, "CreateHmac mock not implemented")
110+
func (m *MockRegistry) CreateHMAC(ctx context.Context, args wallet.CreateHMACArgs, originator string) (*wallet.CreateHMACResult, error) {
111+
require.Fail(m.T, "CreateHMAC mock not implemented")
112112
return nil, nil
113113
}
114114

115-
func (m *MockRegistry) VerifyHmac(ctx context.Context, args wallet.VerifyHmacArgs, originator string) (*wallet.VerifyHmacResult, error) {
116-
require.Fail(m.T, "VerifyHmac mock not implemented")
115+
func (m *MockRegistry) VerifyHMAC(ctx context.Context, args wallet.VerifyHMACArgs, originator string) (*wallet.VerifyHMACResult, error) {
116+
require.Fail(m.T, "VerifyHMAC mock not implemented")
117117
return nil, nil
118118
}
119119

wallet/interfaces.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ type KeyOperations interface {
326326
GetPublicKey(ctx context.Context, args GetPublicKeyArgs, originator string) (*GetPublicKeyResult, error)
327327
Encrypt(ctx context.Context, args EncryptArgs, originator string) (*EncryptResult, error)
328328
Decrypt(ctx context.Context, args DecryptArgs, originator string) (*DecryptResult, error)
329-
CreateHmac(ctx context.Context, args CreateHmacArgs, originator string) (*CreateHmacResult, error)
330-
VerifyHmac(ctx context.Context, args VerifyHmacArgs, originator string) (*VerifyHmacResult, error)
329+
CreateHMAC(ctx context.Context, args CreateHMACArgs, originator string) (*CreateHMACResult, error)
330+
VerifyHMAC(ctx context.Context, args VerifyHMACArgs, originator string) (*VerifyHMACResult, error)
331331
CreateSignature(ctx context.Context, args CreateSignatureArgs, originator string) (*CreateSignatureResult, error)
332332
VerifySignature(ctx context.Context, args VerifySignatureArgs, originator string) (*VerifySignatureResult, error)
333333
}

wallet/mock.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type MockWallet struct {
3333
ProveCertificateError error
3434
GetPublicKeyResult *GetPublicKeyResult
3535
GetPublicKeyError error
36-
CreateHmacResult *CreateHmacResult
36+
CreateHmacResult *CreateHMACResult
3737
CreateHmacError error
3838
CreateSignatureResult *CreateSignatureResult
3939
CreateSignatureError error
@@ -49,7 +49,7 @@ type MockWallet struct {
4949
MockDiscoverByAttributes func(ctx context.Context, args DiscoverByAttributesArgs, originator string) (*DiscoverCertificatesResult, error)
5050
MockGetPublicKey func(ctx context.Context, args GetPublicKeyArgs, originator string) (*GetPublicKeyResult, error)
5151
MockCreateSignature func(ctx context.Context, args CreateSignatureArgs, originator string) (*CreateSignatureResult, error)
52-
MockCreateHmac func(ctx context.Context, args CreateHmacArgs, originator string) (*CreateHmacResult, error)
52+
MockCreateHmac func(ctx context.Context, args CreateHMACArgs, originator string) (*CreateHMACResult, error)
5353
MockDecrypt func(ctx context.Context, args DecryptArgs, originator string) (*DecryptResult, error)
5454
MockVerifySignature func(ctx context.Context, args VerifySignatureArgs, originator string) (*VerifySignatureResult, error)
5555
MockListCertificates func(ctx context.Context, args ListCertificatesArgs, originator string) (*ListCertificatesResult, error)
@@ -191,23 +191,23 @@ func (m *MockWallet) RevealSpecificKeyLinkage(ctx context.Context, args RevealSp
191191
return nil, errors.New("RevealSpecificKeyLinkage mock not implemented")
192192
}
193193

194-
func (m *MockWallet) CreateHmac(ctx context.Context, args CreateHmacArgs, originator string) (*CreateHmacResult, error) {
194+
func (m *MockWallet) CreateHMAC(ctx context.Context, args CreateHMACArgs, originator string) (*CreateHMACResult, error) {
195195
if m.MockCreateHmac != nil {
196196
return m.MockCreateHmac(ctx, args, originator)
197197
}
198198
if m.CreateHmacResult == nil {
199-
require.Fail(m.T, "CreateHmac mock called but CreateHmacResult not set")
200-
return nil, errors.New("CreateHmac mock result not configured")
199+
require.Fail(m.T, "CreateHMAC mock called but CreateHMACResult not set")
200+
return nil, errors.New("CreateHMAC mock result not configured")
201201
}
202202
if m.CreateHmacError != nil {
203203
return nil, m.CreateHmacError
204204
}
205205
return m.CreateHmacResult, nil
206206
}
207207

208-
func (m *MockWallet) VerifyHmac(ctx context.Context, args VerifyHmacArgs, originator string) (*VerifyHmacResult, error) {
209-
require.Fail(m.T, "VerifyHmac mock not implemented")
210-
return nil, errors.New("VerifyHmac mock not implemented")
208+
func (m *MockWallet) VerifyHMAC(ctx context.Context, args VerifyHMACArgs, originator string) (*VerifyHMACResult, error) {
209+
require.Fail(m.T, "VerifyHMAC mock not implemented")
210+
return nil, errors.New("VerifyHMAC mock not implemented")
211211
}
212212

213213
func (m *MockWallet) VerifySignature(ctx context.Context, args VerifySignatureArgs, originator string) (*VerifySignatureResult, error) {

wallet/proto_wallet.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ func (p *ProtoWallet) VerifySignature(
275275

276276
// CreateHmac generates an HMAC (Hash-based Message Authentication Code) for the provided data
277277
// using a symmetric key derived from the protocol, key ID, and counterparty.
278-
func (p *ProtoWallet) CreateHmac(
278+
func (p *ProtoWallet) CreateHMAC(
279279
ctx context.Context,
280-
args CreateHmacArgs,
280+
args CreateHMACArgs,
281281
originator string,
282-
) (*CreateHmacResult, error) {
282+
) (*CreateHMACResult, error) {
283283
if p.keyDeriver == nil {
284284
return nil, errors.New("keyDeriver is undefined")
285285
}
@@ -307,16 +307,16 @@ func (p *ProtoWallet) CreateHmac(
307307
mac.Write(args.Data)
308308
hmacValue := mac.Sum(nil)
309309

310-
return &CreateHmacResult{Hmac: hmacValue}, nil
310+
return &CreateHMACResult{Hmac: hmacValue}, nil
311311
}
312312

313313
// VerifyHmac verifies that the provided HMAC matches the expected value for the given data.
314314
// The verification uses the same protocol, key ID, and counterparty that were used to create the HMAC.
315-
func (p *ProtoWallet) VerifyHmac(
315+
func (p *ProtoWallet) VerifyHMAC(
316316
ctx context.Context,
317-
args VerifyHmacArgs,
317+
args VerifyHMACArgs,
318318
originator string,
319-
) (*VerifyHmacResult, error) {
319+
) (*VerifyHMACResult, error) {
320320
if p.keyDeriver == nil {
321321
return nil, errors.New("keyDeriver is undefined")
322322
}
@@ -346,8 +346,8 @@ func (p *ProtoWallet) VerifyHmac(
346346

347347
// Verify HMAC
348348
if !hmac.Equal(expectedHmac, args.Hmac) {
349-
return &VerifyHmacResult{Valid: false}, nil
349+
return &VerifyHMACResult{Valid: false}, nil
350350
}
351351

352-
return &VerifyHmacResult{Valid: true}, nil
352+
return &VerifyHMACResult{Valid: true}, nil
353353
}

wallet/serializer/create_hmac.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/bsv-blockchain/go-sdk/wallet"
88
)
99

10-
func SerializeCreateHmacArgs(args *wallet.CreateHmacArgs) ([]byte, error) {
10+
func SerializeCreateHmacArgs(args *wallet.CreateHMACArgs) ([]byte, error) {
1111
w := util.NewWriter()
1212

1313
// Encode key related params (protocol, key, counterparty, privileged)
@@ -34,9 +34,9 @@ func SerializeCreateHmacArgs(args *wallet.CreateHmacArgs) ([]byte, error) {
3434
return w.Buf, nil
3535
}
3636

37-
func DeserializeCreateHmacArgs(data []byte) (*wallet.CreateHmacArgs, error) {
37+
func DeserializeCreateHmacArgs(data []byte) (*wallet.CreateHMACArgs, error) {
3838
r := util.NewReaderHoldError(data)
39-
args := &wallet.CreateHmacArgs{}
39+
args := &wallet.CreateHMACArgs{}
4040

4141
// Decode key related params
4242
params, err := decodeKeyRelatedParams(r)
@@ -58,22 +58,22 @@ func DeserializeCreateHmacArgs(data []byte) (*wallet.CreateHmacArgs, error) {
5858

5959
r.CheckComplete()
6060
if r.Err != nil {
61-
return nil, fmt.Errorf("error deserializing CreateHmac args: %w", r.Err)
61+
return nil, fmt.Errorf("error deserializing CreateHMAC args: %w", r.Err)
6262
}
6363

6464
return args, nil
6565
}
6666

67-
func SerializeCreateHmacResult(result *wallet.CreateHmacResult) ([]byte, error) {
67+
func SerializeCreateHmacResult(result *wallet.CreateHMACResult) ([]byte, error) {
6868
w := util.NewWriter()
6969
w.WriteByte(0) // errorByte = 0 (success)
7070
w.WriteBytes(result.Hmac)
7171
return w.Buf, nil
7272
}
7373

74-
func DeserializeCreateHmacResult(data []byte) (*wallet.CreateHmacResult, error) {
74+
func DeserializeCreateHmacResult(data []byte) (*wallet.CreateHMACResult, error) {
7575
r := util.NewReaderHoldError(data)
76-
result := &wallet.CreateHmacResult{}
76+
result := &wallet.CreateHMACResult{}
7777

7878
// Read error byte (0 = success)
7979
errorByte := r.ReadByte()
@@ -85,7 +85,7 @@ func DeserializeCreateHmacResult(data []byte) (*wallet.CreateHmacResult, error)
8585
result.Hmac = r.ReadRemaining()
8686

8787
if r.Err != nil {
88-
return nil, fmt.Errorf("error deserializing CreateHmac result: %w", r.Err)
88+
return nil, fmt.Errorf("error deserializing CreateHMAC result: %w", r.Err)
8989
}
9090

9191
return result, nil

wallet/serializer/create_hmac_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
func TestCreateHmacArgs(t *testing.T) {
1010
tests := []struct {
1111
name string
12-
args *wallet.CreateHmacArgs
12+
args *wallet.CreateHMACArgs
1313
}{{
1414
name: "full args",
15-
args: &wallet.CreateHmacArgs{
15+
args: &wallet.CreateHMACArgs{
1616
EncryptionArgs: wallet.EncryptionArgs{
1717
ProtocolID: wallet.Protocol{
1818
SecurityLevel: wallet.SecurityLevelEveryApp,
@@ -28,7 +28,7 @@ func TestCreateHmacArgs(t *testing.T) {
2828
},
2929
}, {
3030
name: "minimal args",
31-
args: &wallet.CreateHmacArgs{
31+
args: &wallet.CreateHMACArgs{
3232
EncryptionArgs: wallet.EncryptionArgs{
3333
ProtocolID: wallet.Protocol{
3434
SecurityLevel: wallet.SecurityLevelSilent,
@@ -40,7 +40,7 @@ func TestCreateHmacArgs(t *testing.T) {
4040
},
4141
}, {
4242
name: "empty data",
43-
args: &wallet.CreateHmacArgs{
43+
args: &wallet.CreateHMACArgs{
4444
EncryptionArgs: wallet.EncryptionArgs{
4545
ProtocolID: wallet.Protocol{
4646
SecurityLevel: wallet.SecurityLevelSilent,
@@ -70,7 +70,7 @@ func TestCreateHmacArgs(t *testing.T) {
7070

7171
func TestCreateHmacResult(t *testing.T) {
7272
t.Run("serialize/deserialize", func(t *testing.T) {
73-
result := &wallet.CreateHmacResult{Hmac: []byte{1, 2, 3, 4}}
73+
result := &wallet.CreateHMACResult{Hmac: []byte{1, 2, 3, 4}}
7474
data, err := SerializeCreateHmacResult(result)
7575
require.NoError(t, err)
7676

0 commit comments

Comments
 (0)