2018-07-01 21:07:50 +02:00
|
|
|
// +build !enable_trezor
|
|
|
|
|
|
|
|
package readpassword
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/rfjakob/gocryptfs/internal/tlog"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2018-07-01 22:00:06 +02:00
|
|
|
// TrezorPayloadLen is the length of the payload data passed to Trezor's
|
|
|
|
// CipherKeyValue function.
|
2018-07-01 21:07:50 +02:00
|
|
|
TrezorPayloadLen = 32
|
2018-08-15 23:31:37 +02:00
|
|
|
// TrezorSupport is true when gocryptfs has been compile with -tags enable_trezor
|
|
|
|
TrezorSupport = false
|
2018-07-01 21:07:50 +02:00
|
|
|
)
|
|
|
|
|
2018-07-01 22:00:06 +02:00
|
|
|
// Trezor determinitically derives 32 bytes from the payload and the connected
|
|
|
|
// USB security module.
|
2018-07-01 21:07:50 +02:00
|
|
|
func Trezor(payload []byte) []byte {
|
2018-08-15 23:31:37 +02:00
|
|
|
tlog.Fatal.Printf("This binary has been compiled without Trezor support")
|
2018-07-01 21:07:50 +02:00
|
|
|
os.Exit(1)
|
|
|
|
return nil
|
|
|
|
}
|