File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ func (conf *AEADConfig) Mode() AEADMode {
37
37
38
38
// ChunkSizeByte returns the byte indicating the chunk size. The effective
39
39
// chunk size is computed with the formula uint64(1) << (chunkSizeByte + 6)
40
- // limit to 16 = 4 MiB
40
+ // limit chunkSizeByte to 16 which equals to 2^22 = 4 MiB
41
41
// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-5.13.2
42
42
func (conf * AEADConfig ) ChunkSizeByte () byte {
43
43
if conf == nil || conf .ChunkSize == 0 {
@@ -49,8 +49,8 @@ func (conf *AEADConfig) ChunkSizeByte() byte {
49
49
switch {
50
50
case exponent < 6 :
51
51
exponent = 6
52
- case exponent > 16 :
53
- exponent = 16
52
+ case exponent > 22 :
53
+ exponent = 22
54
54
}
55
55
56
56
return byte (exponent - 6 )
You can’t perform that action at this time.
0 commit comments