Moved crypto code to top level again
This commit is contained in:
parent
68948a5f13
commit
9016390a6e
|
@ -17,7 +17,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/tendermint/go-keys/cmd"
|
"github.com/tendermint/go-crypto/keys/cmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
@ -19,9 +19,9 @@ import (
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
"github.com/tendermint/go-keys/cryptostore"
|
"github.com/tendermint/go-crypto/keys/cryptostore"
|
||||||
"github.com/tendermint/go-keys/storage/filestorage"
|
"github.com/tendermint/go-crypto/keys/storage/filestorage"
|
||||||
)
|
)
|
||||||
|
|
||||||
const KeySubdir = "keys"
|
const KeySubdir = "keys"
|
||||||
|
|
|
@ -25,7 +25,7 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"github.com/tendermint/go-keys/server"
|
"github.com/tendermint/go-crypto/keys/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
// serveCmd represents the serve command
|
// serveCmd represents the serve command
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
data "github.com/tendermint/go-data"
|
data "github.com/tendermint/go-data"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
)
|
)
|
||||||
|
|
||||||
const PassLength = 10
|
const PassLength = 10
|
||||||
|
|
|
@ -2,7 +2,7 @@ package cryptostore
|
||||||
|
|
||||||
import (
|
import (
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
)
|
)
|
||||||
|
|
||||||
// encryptedStorage needs passphrase to get private keys
|
// encryptedStorage needs passphrase to get private keys
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/tendermint/go-keys/cryptostore"
|
"github.com/tendermint/go-crypto/keys/cryptostore"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNoopEncoder(t *testing.T) {
|
func TestNoopEncoder(t *testing.T) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package cryptostore
|
package cryptostore
|
||||||
|
|
||||||
import keys "github.com/tendermint/go-keys"
|
import keys "github.com/tendermint/go-crypto/keys"
|
||||||
|
|
||||||
// Manager combines encyption and storage implementation to provide
|
// Manager combines encyption and storage implementation to provide
|
||||||
// a full-featured key manager
|
// a full-featured key manager
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
"github.com/tendermint/go-keys/cryptostore"
|
"github.com/tendermint/go-crypto/keys/cryptostore"
|
||||||
"github.com/tendermint/go-keys/storage/memstorage"
|
"github.com/tendermint/go-crypto/keys/storage/memstorage"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestKeyManagement makes sure we can manipulate these keys well
|
// TestKeyManagement makes sure we can manipulate these keys well
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSortKeys(t *testing.T) {
|
func TestSortKeys(t *testing.T) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
data "github.com/tendermint/go-data"
|
data "github.com/tendermint/go-data"
|
||||||
"github.com/tendermint/go-keys/server/types"
|
"github.com/tendermint/go-crypto/keys/server/types"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
"github.com/tendermint/go-keys/server/types"
|
"github.com/tendermint/go-crypto/keys/server/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Keys struct {
|
type Keys struct {
|
||||||
|
|
|
@ -10,11 +10,11 @@ import (
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
"github.com/tendermint/go-keys/cryptostore"
|
"github.com/tendermint/go-crypto/keys/cryptostore"
|
||||||
"github.com/tendermint/go-keys/server"
|
"github.com/tendermint/go-crypto/keys/server"
|
||||||
"github.com/tendermint/go-keys/server/types"
|
"github.com/tendermint/go-crypto/keys/server/types"
|
||||||
"github.com/tendermint/go-keys/storage/memstorage"
|
"github.com/tendermint/go-crypto/keys/storage/memstorage"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestKeyServer(t *testing.T) {
|
func TestKeyServer(t *testing.T) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBasicCRUD(t *testing.T) {
|
func TestBasicCRUD(t *testing.T) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ package memstorage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
)
|
)
|
||||||
|
|
||||||
type data struct {
|
type data struct {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBasicCRUD(t *testing.T) {
|
func TestBasicCRUD(t *testing.T) {
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
"github.com/tendermint/go-keys/cryptostore"
|
"github.com/tendermint/go-crypto/keys/cryptostore"
|
||||||
"github.com/tendermint/go-keys/storage/memstorage"
|
"github.com/tendermint/go-crypto/keys/storage/memstorage"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMultiSig(t *testing.T) {
|
func TestMultiSig(t *testing.T) {
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
"github.com/tendermint/go-keys/cryptostore"
|
"github.com/tendermint/go-crypto/keys/cryptostore"
|
||||||
"github.com/tendermint/go-keys/storage/memstorage"
|
"github.com/tendermint/go-crypto/keys/storage/memstorage"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestOneSig(t *testing.T) {
|
func TestOneSig(t *testing.T) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package tx
|
||||||
import (
|
import (
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
data "github.com/tendermint/go-data"
|
data "github.com/tendermint/go-data"
|
||||||
keys "github.com/tendermint/go-keys"
|
keys "github.com/tendermint/go-crypto/keys"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
data "github.com/tendermint/go-data"
|
data "github.com/tendermint/go-data"
|
||||||
"github.com/tendermint/go-keys/cryptostore"
|
"github.com/tendermint/go-crypto/keys/cryptostore"
|
||||||
"github.com/tendermint/go-keys/storage/memstorage"
|
"github.com/tendermint/go-crypto/keys/storage/memstorage"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestReader(t *testing.T) {
|
func TestReader(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue