diff options
Diffstat (limited to 'vendor/golang.org/x/crypto')
-rw-r--r-- | vendor/golang.org/x/crypto/AUTHORS | 3 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/CONTRIBUTORS | 3 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/bcrypt/bcrypt.go | 7 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/blowfish/cipher.go | 2 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/blowfish/const.go | 2 |
5 files changed, 12 insertions, 5 deletions
diff --git a/vendor/golang.org/x/crypto/AUTHORS b/vendor/golang.org/x/crypto/AUTHORS new file mode 100644 index 0000000..2b00ddb --- /dev/null +++ b/vendor/golang.org/x/crypto/AUTHORS | |||
@@ -0,0 +1,3 @@ | |||
1 | # This source code refers to The Go Authors for copyright purposes. | ||
2 | # The master list of authors is in the main Go distribution, | ||
3 | # visible at https://tip.golang.org/AUTHORS. | ||
diff --git a/vendor/golang.org/x/crypto/CONTRIBUTORS b/vendor/golang.org/x/crypto/CONTRIBUTORS new file mode 100644 index 0000000..1fbd3e9 --- /dev/null +++ b/vendor/golang.org/x/crypto/CONTRIBUTORS | |||
@@ -0,0 +1,3 @@ | |||
1 | # This source code was written by the Go contributors. | ||
2 | # The master list of contributors is in the main Go distribution, | ||
3 | # visible at https://tip.golang.org/CONTRIBUTORS. | ||
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 { |
diff --git a/vendor/golang.org/x/crypto/blowfish/cipher.go b/vendor/golang.org/x/crypto/blowfish/cipher.go index a73954f..2641dad 100644 --- a/vendor/golang.org/x/crypto/blowfish/cipher.go +++ b/vendor/golang.org/x/crypto/blowfish/cipher.go | |||
@@ -6,7 +6,7 @@ | |||
6 | package blowfish // import "golang.org/x/crypto/blowfish" | 6 | package blowfish // import "golang.org/x/crypto/blowfish" |
7 | 7 | ||
8 | // The code is a port of Bruce Schneier's C implementation. | 8 | // The code is a port of Bruce Schneier's C implementation. |
9 | // See http://www.schneier.com/blowfish.html. | 9 | // See https://www.schneier.com/blowfish.html. |
10 | 10 | ||
11 | import "strconv" | 11 | import "strconv" |
12 | 12 | ||
diff --git a/vendor/golang.org/x/crypto/blowfish/const.go b/vendor/golang.org/x/crypto/blowfish/const.go index 8c5ee4c..d040775 100644 --- a/vendor/golang.org/x/crypto/blowfish/const.go +++ b/vendor/golang.org/x/crypto/blowfish/const.go | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | // The startup permutation array and substitution boxes. | 5 | // The startup permutation array and substitution boxes. |
6 | // They are the hexadecimal digits of PI; see: | 6 | // They are the hexadecimal digits of PI; see: |
7 | // http://www.schneier.com/code/constants.txt. | 7 | // https://www.schneier.com/code/constants.txt. |
8 | 8 | ||
9 | package blowfish | 9 | package blowfish |
10 | 10 | ||