mirror of
https://github.com/fumiama/gofastTEA.git
synced 2026-06-04 23:40:29 +08:00
fix: encrypt to in go 1.17
This commit is contained in:
@@ -41,7 +41,7 @@ func (t TEA) EncryptTo(src []byte, dst []byte) int {
|
||||
copy(dst[fill:], src)
|
||||
|
||||
var iv1, iv2, holder uint64
|
||||
for i := 0; i < len(dst); i += 8 {
|
||||
for i := 0; i < fill+lens+7; i += 8 {
|
||||
block := binary.BigEndian.Uint64(dst[i:])
|
||||
holder = block ^ iv1
|
||||
iv1 = t.encode(holder)
|
||||
|
||||
Reference in New Issue
Block a user