This repository was archived by the owner on Apr 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import (
18
18
"errors"
19
19
"io"
20
20
21
- "github.com/google/tink/go/core/primitiveset"
22
21
"github.com/google/tink/go/tink"
23
22
)
24
23
@@ -47,21 +46,14 @@ func (dr *decryptReader) Read(p []byte) (n int, err error) {
47
46
return 0 , errKeyNotFound
48
47
}
49
48
50
- // For legacy reasons (Tink always encrypted with non-RAW keys) we use all
51
- // primitives, even those which have output_prefix_type != RAW.
52
- var allEntries []* primitiveset.Entry
53
- for _ , entryList := range dr .wrapped .ps .Entries {
54
- allEntries = append (allEntries , entryList ... )
55
- }
56
- if err != nil {
57
- return 0 , err
58
- }
59
-
60
49
dr .matchAttempted = true
61
50
ur := & unreader {r : dr .cr }
62
51
63
52
// find proper key to decrypt ciphertext
64
- for _ , e := range allEntries {
53
+ //
54
+ // For legacy reasons (Tink always encrypted with non-RAW keys) we use all
55
+ // primitives, even those which have output_prefix_type != RAW.
56
+ for _ , e := range dr .wrapped .ps .EntriesInKeysetOrder {
65
57
sa , ok := e .Primitive .(tink.StreamingAEAD )
66
58
if ! ok {
67
59
continue
You can’t perform that action at this time.
0 commit comments