1// SPDX-License-Identifier: ISC
2// Copyright (c) 2014-2020 Bitmark Inc.
3// Use of this source code is governed by an ISC
4// license that can be found in the LICENSE file.
5
6package id
7
8import (
9	"bytes"
10	"fmt"
11)
12
13type ID []byte
14
15// Compare - public key comparison for AVL interface
16func (i ID) Compare(q interface{}) int {
17	return bytes.Compare(i, q.(ID))
18}
19
20// String - public key string convert for AVL interface
21func (i ID) String() string {
22	return fmt.Sprintf("%x", []byte(i))
23}
24