mirror of
https://codeberg.org/superseriousbusiness/gotosocial.git
synced 2025-05-02 10:30:23 +03:00
migrate go version to 1.17 (#203)
* migrate go version to 1.17 * update contributing
This commit is contained in:
parent
e681aac589
commit
f2e5bedea6
282 changed files with 11863 additions and 12600 deletions
vendor/github.com/golang-jwt/jwt
18
vendor/github.com/golang-jwt/jwt/ecdsa.go
generated
vendored
18
vendor/github.com/golang-jwt/jwt/ecdsa.go
generated
vendored
|
@ -128,18 +128,12 @@ func (m *SigningMethodECDSA) Sign(signingString string, key interface{}) (string
|
|||
keyBytes += 1
|
||||
}
|
||||
|
||||
// We serialize the outpus (r and s) into big-endian byte arrays and pad
|
||||
// them with zeros on the left to make sure the sizes work out. Both arrays
|
||||
// must be keyBytes long, and the output must be 2*keyBytes long.
|
||||
rBytes := r.Bytes()
|
||||
rBytesPadded := make([]byte, keyBytes)
|
||||
copy(rBytesPadded[keyBytes-len(rBytes):], rBytes)
|
||||
|
||||
sBytes := s.Bytes()
|
||||
sBytesPadded := make([]byte, keyBytes)
|
||||
copy(sBytesPadded[keyBytes-len(sBytes):], sBytes)
|
||||
|
||||
out := append(rBytesPadded, sBytesPadded...)
|
||||
// We serialize the outputs (r and s) into big-endian byte arrays
|
||||
// padded with zeros on the left to make sure the sizes work out.
|
||||
// Output must be 2*keyBytes long.
|
||||
out := make([]byte, 2*keyBytes)
|
||||
r.FillBytes(out[0:keyBytes]) // r is assigned to the first half of output.
|
||||
s.FillBytes(out[keyBytes:]) // s is assigned to the second half of output.
|
||||
|
||||
return EncodeSegment(out), nil
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue