aboutsummaryrefslogtreecommitdiff
path: root/object/id/object_id_ops.go
diff options
context:
space:
mode:
Diffstat (limited to 'object/id/object_id_ops.go')
-rw-r--r--object/id/object_id_ops.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/object/id/object_id_ops.go b/object/id/object_id_ops.go
index 1ca0c6df..b97cb19a 100644
--- a/object/id/object_id_ops.go
+++ b/object/id/object_id_ops.go
@@ -5,14 +5,14 @@ import (
"encoding/hex"
)
-// Algorithm returns the object ID's hash algorithm.
-func (id ObjectID) Algorithm() Algorithm {
- return id.algo
+// ObjectFormat returns the object ID's object format (hash algorithm).
+func (id ObjectID) ObjectFormat() ObjectFormat {
+ return id.objectFormat
}
// Bytes returns a copy of the object ID bytes.
func (id ObjectID) Bytes() []byte {
- size := id.Algorithm().Size()
+ size := id.ObjectFormat().Size()
return append([]byte(nil), id.data[:size]...)
}
@@ -23,7 +23,7 @@ func (id ObjectID) Bytes() []byte {
//
// Labels: Mut-No.
func (id *ObjectID) RawBytes() []byte {
- size := id.Algorithm().Size()
+ size := id.ObjectFormat().Size()
return id.data[:size:size]
}
@@ -36,7 +36,7 @@ func (id ObjectID) Compare(other ObjectID) int {
// String returns the canonical hex representation.
func (id ObjectID) String() string {
- size := id.Algorithm().Size()
+ size := id.ObjectFormat().Size()
return hex.EncodeToString(id.data[:size])
}