summaryrefslogtreecommitdiff
path: root/internal/readpassword/trezor_disabled.go
blob: 96a60827af22b8fc0bb548be40264c2434bae4f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// +build !enable_trezor

package readpassword

import (
	"os"

	"github.com/rfjakob/gocryptfs/internal/tlog"
)

const (
	// TrezorPayloadLen is the length of the payload data passed to Trezor's
	// CipherKeyValue function.
	TrezorPayloadLen = 32
	// TrezorSupport is true when gocryptfs has been compile with -tags enable_trezor
	TrezorSupport = false
)

// Trezor determinitically derives 32 bytes from the payload and the connected
// USB security module.
func Trezor(payload []byte) []byte {
	tlog.Fatal.Printf("This binary has been compiled without Trezor support")
	os.Exit(1)
	return nil
}