Adding windows support (#22)

This commit is contained in:
Kevin E Rad
2019-06-01 18:02:45 -04:00
committed by Pierre Carrier
parent b790c569ab
commit 64a70580db
2 changed files with 6 additions and 8 deletions

View File

@ -1,9 +1,6 @@
sudo: false sudo: false
language: go language: go
go: go:
- 1.0 - 1.7
- 1.1 - 1.8
- 1.2 - 1.9
- 1.3
- 1.4
- 1.5

View File

@ -10,7 +10,6 @@ import (
"encoding/base32" "encoding/base32"
"encoding/csv" "encoding/csv"
"fmt" "fmt"
"golang.org/x/crypto/ssh/terminal"
"io/ioutil" "io/ioutil"
"log" "log"
"math/big" "math/big"
@ -19,6 +18,8 @@ import (
"strings" "strings"
"syscall" "syscall"
"time" "time"
"golang.org/x/crypto/ssh/terminal"
) )
func TimeStamp() (int64, int) { func TimeStamp() (int64, int) {
@ -84,7 +85,7 @@ func main() {
// Support for 'openssl enc -aes-128-cbc -md sha256 -pass pass:' // Support for 'openssl enc -aes-128-cbc -md sha256 -pass pass:'
if bytes.Compare(cfgContent[:8], []byte{0x53, 0x61, 0x6c, 0x74, 0x65, 0x64, 0x5f, 0x5f}) == 0 { if bytes.Compare(cfgContent[:8], []byte{0x53, 0x61, 0x6c, 0x74, 0x65, 0x64, 0x5f, 0x5f}) == 0 {
fmt.Printf("Encryption password: ") fmt.Printf("Encryption password: ")
passwd, e := terminal.ReadPassword(syscall.Stdin) passwd, e := terminal.ReadPassword(int(syscall.Stdin))
fmt.Printf("\n") fmt.Printf("\n")
if e != nil { if e != nil {
log.Fatal(e) log.Fatal(e)