Revert "fix: need to use BigEndian to encode little?"

This reverts commit 936450f9e6.
This commit is contained in:
Derrick Hammer 2024-01-17 10:34:14 -05:00
parent 936450f9e6
commit c95a953ca2
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import "encoding/binary"
func EncodeEndian(value uint64, length int) []byte { func EncodeEndian(value uint64, length int) []byte {
byteSlice := make([]byte, length) byteSlice := make([]byte, length)
binary.BigEndian.PutUint64(byteSlice, value) binary.LittleEndian.PutUint64(byteSlice, value)
return byteSlice return byteSlice
} }
@ -12,5 +12,5 @@ func DecodeEndian(byteSlice []byte) uint64 {
buffer := make([]byte, 8) buffer := make([]byte, 8)
copy(buffer, byteSlice) copy(buffer, byteSlice)
return binary.BigEndian.Uint64(buffer) return binary.LittleEndian.Uint64(buffer)
} }