Swap base58 libraries (#472)

* Swap base58 libraries

This doesn't reduce binary size but it removes a metric ton of
dependencies.
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-09-26 14:01:49 -04:00
1 parent c30fd5620e
commit cf3fa4522d
10 files changed
+44 -35

No files matched your search

+4 -2
View File
@@ -6,7 +6,6 @@ import (
mathrand "math/rand"
"time"
"github.com/btcsuite/btcutil/base58"
"github.com/hashicorp/boundary/globals"
"github.com/hashicorp/boundary/internal/authtoken/store"
"github.com/hashicorp/boundary/internal/db"
@@ -15,6 +14,7 @@ import (
wrapping "github.com/hashicorp/go-kms-wrapping"
"github.com/hashicorp/go-kms-wrapping/structwrapping"
"github.com/hashicorp/vault/sdk/helper/base62"
"github.com/mr-tron/base58"
"google.golang.org/protobuf/proto"
)
@@ -133,5 +133,7 @@ func EncryptToken(ctx context.Context, kmsCache *kms.Kms, scopeId, publicId, tok
return "", fmt.Errorf("error marshaling encrypted token: %w", err)
}
return globals.ServiceTokenV1 + base58.Encode(marshaledBlob), nil
encoded := base58.FastBase58Encoding(marshaledBlob)
return globals.ServiceTokenV1 + encoded, nil
}