Skip to content

Commit

Permalink
Match Endian
Browse files Browse the repository at this point in the history
  • Loading branch information
BarnabyShearer committed Sep 27, 2023
1 parent ace28b0 commit 8f77f83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/provider/key_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ type response struct {

func bin(len int, data int) string {
bs := make([]byte, 8)
binary.BigEndian.PutUint64(bs, uint64(data))
return string(bs[8-len:])
binary.LittleEndian.PutUint64(bs, uint64(data))
return string(bs[:len])
}

func generate(ctx context.Context, req request, resp *response) {
Expand Down

0 comments on commit 8f77f83

Please sign in to comment.