Skip to content

Commit

Permalink
优化 SMKDF
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed May 25, 2024
1 parent e014116 commit 363a2ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kdf/smkdf/smkdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func Key(h func() hash.Hash, z []byte, size int) []byte {
mdSize := md.Size()

limit := (uint64(size) + uint64(mdSize) - 1) / uint64(mdSize)
if limit >= uint64(1 << mdSize) - 1 {
if limit >= uint64(1 << 32) - 1 {
panic("kdf: key length too long")
}

Expand Down

0 comments on commit 363a2ad

Please sign in to comment.