mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2025-02-23 23:35:16 +00:00
16 lines
496 B
Go
16 lines
496 B
Go
// Copyright 2018 The LevelDB-Go and Pebble Authors. All rights reserved. Use
|
|
// of this source code is governed by a BSD-style license that can be found in
|
|
// the LICENSE file.
|
|
|
|
package main
|
|
|
|
func encodeUint32Ascending(b []byte, v uint32) []byte {
|
|
return append(b, byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
|
|
}
|
|
|
|
func encodeUint64Ascending(b []byte, v uint64) []byte {
|
|
return append(b,
|
|
byte(v>>56), byte(v>>48), byte(v>>40), byte(v>>32),
|
|
byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
|
|
}
|