diff options
author | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:22 -0500 |
---|---|---|
committer | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:22 -0500 |
commit | 07971ca38143c5faf951d152fba370ddcbe26ad5 (patch) | |
tree | 09af1ef91c782de921efc83113907184c8adecee /vendor/golang.org/x/crypto/bcrypt/bcrypt.go | |
parent | 9b6f05970a001f683b9c886c652de81f00cd5f00 (diff) | |
download | terraform-provider-statuscake-07971ca38143c5faf951d152fba370ddcbe26ad5.tar.gz terraform-provider-statuscake-07971ca38143c5faf951d152fba370ddcbe26ad5.tar.zst terraform-provider-statuscake-07971ca38143c5faf951d152fba370ddcbe26ad5.zip |
deps: use go modules for dep mgmt
run go mod tidy
remove govendor from makefile and travis config
set appropriate env vars for go modules
Diffstat (limited to 'vendor/golang.org/x/crypto/bcrypt/bcrypt.go')
-rw-r--r-- | vendor/golang.org/x/crypto/bcrypt/bcrypt.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go index f8b807f..202fa8a 100644 --- a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go +++ b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go | |||
@@ -12,9 +12,10 @@ import ( | |||
12 | "crypto/subtle" | 12 | "crypto/subtle" |
13 | "errors" | 13 | "errors" |
14 | "fmt" | 14 | "fmt" |
15 | "golang.org/x/crypto/blowfish" | ||
16 | "io" | 15 | "io" |
17 | "strconv" | 16 | "strconv" |
17 | |||
18 | "golang.org/x/crypto/blowfish" | ||
18 | ) | 19 | ) |
19 | 20 | ||
20 | const ( | 21 | const ( |
@@ -205,7 +206,6 @@ func bcrypt(password []byte, cost int, salt []byte) ([]byte, error) { | |||
205 | } | 206 | } |
206 | 207 | ||
207 | func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cipher, error) { | 208 | func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cipher, error) { |
208 | |||
209 | csalt, err := base64Decode(salt) | 209 | csalt, err := base64Decode(salt) |
210 | if err != nil { | 210 | if err != nil { |
211 | return nil, err | 211 | return nil, err |
@@ -213,7 +213,8 @@ func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cip | |||
213 | 213 | ||
214 | // Bug compatibility with C bcrypt implementations. They use the trailing | 214 | // Bug compatibility with C bcrypt implementations. They use the trailing |
215 | // NULL in the key string during expansion. | 215 | // NULL in the key string during expansion. |
216 | ckey := append(key, 0) | 216 | // We copy the key to prevent changing the underlying array. |
217 | ckey := append(key[:len(key):len(key)], 0) | ||
217 | 218 | ||
218 | c, err := blowfish.NewSaltedCipher(ckey, csalt) | 219 | c, err := blowfish.NewSaltedCipher(ckey, csalt) |
219 | if err != nil { | 220 | if err != nil { |