2019-06-21 23:21:16 +01:00
|
|
|
// 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
|
2019-11-22 21:00:04 +00:00
|
|
|
_, err := DeriveRootKey([]byte("password"), []byte("salt"), "", 8)
|
2019-06-21 23:21:16 +01:00
|
|
|
assert.NoError(t, err)
|
2019-11-22 21:00:04 +00:00
|
|
|
_, err = DeriveRootKey([]byte("password"), []byte("salt"), "any/path", 8)
|
2019-06-21 23:21:16 +01:00
|
|
|
assert.NoError(t, err)
|
|
|
|
}
|