storj/pkg/encryption/password_test.go

19 lines
433 B
Go
Raw Normal View History

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package encryption
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestDeriveRootKey(t *testing.T) {
// ensure that we can derive with no errors
_, err := DeriveRootKey([]byte("password"), []byte("salt"), "")
assert.NoError(t, err)
_, err = DeriveRootKey([]byte("password"), []byte("salt"), "any/path")
assert.NoError(t, err)
}