]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/node.go
Simplify Base32-related code
[nncp.git] / src / node.go
index 7bfd0efda5723cb71d164410a4428a2fbf47627e..999af3d9b3bc88e5624669e004809c62bba5b2be 100644 (file)
@@ -32,7 +32,7 @@ import (
 type NodeId [blake2b.Size256]byte
 
 func (id NodeId) String() string {
-       return ToBase32(id[:])
+       return Base32Codec.EncodeToString(id[:])
 }
 
 type Node struct {
@@ -112,7 +112,7 @@ func (nodeOur *NodeOur) Their() *Node {
 }
 
 func NodeIdFromString(raw string) (*NodeId, error) {
-       decoded, err := FromBase32(raw)
+       decoded, err := Base32Codec.DecodeString(raw)
        if err != nil {
                return nil, err
        }