Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix sha512 buffer length
  • Loading branch information
qmuntal committed May 21, 2025
commit b95750907c5e29d0a541e8af8ffc945bc9a8d420
7 changes: 6 additions & 1 deletion providersymcrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ func (u *_UINT64) uint64() uint64 {
// to the given destination slice.
func symCryptAppendBinary(dst, chain, buffer []byte, blength _UINT64) []byte {
length := blength.uint64()
nx := length & 0x3f
var nx uint64
if len(buffer) <= 64 {
nx = length & 0x3f
} else {
nx = length & 0x7f
}
dst = append(dst, chain...)
dst = append(dst, buffer[:nx]...)
dst = append(dst, make([]byte, len(buffer)-int(nx))...)
Expand Down
Loading