@@ -192,7 +192,7 @@ func TestValidateShamirParams(t *testing.T) {
192192}
193193
194194func TestShareEncodeDecode (t * testing.T ) {
195- original := NewShare (1 , 5 , 3 , "Alice" , []byte ("test-share-data" ))
195+ original := NewShare (1 , 1 , 5 , 3 , "Alice" , []byte ("test-share-data" ))
196196
197197 encoded := original .Encode ()
198198
@@ -225,7 +225,7 @@ func TestShareEncodeDecode(t *testing.T) {
225225}
226226
227227func TestShareVerify (t * testing.T ) {
228- share := NewShare (1 , 5 , 3 , "Alice" , []byte ("test-data" ))
228+ share := NewShare (1 , 1 , 5 , 3 , "Alice" , []byte ("test-data" ))
229229
230230 // Valid checksum
231231 if err := share .Verify (); err != nil {
@@ -251,7 +251,7 @@ func TestShareFilename(t *testing.T) {
251251 }
252252
253253 for _ , tt := range tests {
254- share := NewShare (1 , 3 , 2 , tt .holder , []byte ("data" ))
254+ share := NewShare (1 , 1 , 3 , 2 , tt .holder , []byte ("data" ))
255255 got := share .Filename ()
256256 if got != tt .expected {
257257 t .Errorf ("holder %q: got %q, want %q" , tt .holder , got , tt .expected )
@@ -260,7 +260,7 @@ func TestShareFilename(t *testing.T) {
260260}
261261
262262func TestCompactEncodeRoundTrip (t * testing.T ) {
263- original := NewShare (1 , 5 , 3 , "Alice" , []byte ("test-share-data-1234567890" ))
263+ original := NewShare (1 , 1 , 5 , 3 , "Alice" , []byte ("test-share-data-1234567890" ))
264264
265265 compact := original .CompactEncode ()
266266
@@ -297,7 +297,7 @@ func TestCompactEncodeWithRealShares(t *testing.T) {
297297 }
298298
299299 for i , shareData := range shares {
300- share := NewShare (i + 1 , 5 , 3 , "" , shareData )
300+ share := NewShare (1 , i + 1 , 5 , 3 , "" , shareData )
301301 compact := share .CompactEncode ()
302302
303303 decoded , err := ParseCompact (compact )
@@ -311,7 +311,7 @@ func TestCompactEncodeWithRealShares(t *testing.T) {
311311}
312312
313313func TestCompactEncodeFormat (t * testing.T ) {
314- share := NewShare (2 , 5 , 3 , "Bob" , []byte {0xDE , 0xAD , 0xBE , 0xEF })
314+ share := NewShare (1 , 2 , 5 , 3 , "Bob" , []byte {0xDE , 0xAD , 0xBE , 0xEF })
315315 compact := share .CompactEncode ()
316316
317317 if ! strings .HasPrefix (compact , "RM1:" ) {
@@ -346,7 +346,7 @@ func TestCompactEncodeFormat(t *testing.T) {
346346
347347func TestParseCompactRejectsBadInput (t * testing.T ) {
348348 // Build a valid compact string to use as a base
349- share := NewShare (1 , 5 , 3 , "Alice" , []byte ("valid-data" ))
349+ share := NewShare (1 , 1 , 5 , 3 , "Alice" , []byte ("valid-data" ))
350350 valid := share .CompactEncode ()
351351
352352 tests := []struct {
@@ -381,7 +381,7 @@ func TestParseCompactRejectsBadInput(t *testing.T) {
381381func TestCompactEncodeNoHolderOrCreated (t * testing.T ) {
382382 // Compact format intentionally omits Holder and Created metadata
383383 // to keep the string short for QR codes
384- share := NewShare (3 , 7 , 4 , "Carol with spaces" , []byte ("some-share-data" ))
384+ share := NewShare (1 , 3 , 7 , 4 , "Carol with spaces" , []byte ("some-share-data" ))
385385 compact := share .CompactEncode ()
386386 decoded , err := ParseCompact (compact )
387387 if err != nil {
0 commit comments