Skip to content

Commit

Permalink
chore(ci): fix lint findings
Browse files Browse the repository at this point in the history
  • Loading branch information
Zenithar committed Apr 9, 2024
1 parent 73ee6cf commit ec3bc25
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
run:
timeout: 5m
tests: false
skip-files:

issues:
exclude-files:
- "testing.go"
- ".*\\.pb\\.go"
- ".*\\.gen\\.go"

linters-settings:
golint:
min-confidence: 0
goconst:
min-len: 5
min-occurrences: 4
Expand Down
2 changes: 1 addition & 1 deletion v3/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func kdf(key *LocalKey, n []byte) (ek, n2, ak []byte, err error) {

func mac(ak, h, n, c, f, i []byte) []byte {
// Compute pre-authentication message
preAuth := common.PreAuthenticationEncoding([]byte(h), n, c, f, i)
preAuth := common.PreAuthenticationEncoding(h, n, c, f, i)

// Compute MAC
mac := hmac.New(sha512.New384, ak)
Expand Down
2 changes: 1 addition & 1 deletion v3/internal/rfc6979/ecdsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func SignECDSA(priv *ecdsa.PrivateKey, digest []byte, alg func() hash.Hash) (r,
return
}

// copied from crypto/ecdsa
// copied from crypto/ecdsa.
func hashToInt(digest []byte, c elliptic.Curve) *big.Int {
orderBits := c.Params().N.BitLen()
orderBytes := (orderBits + 7) / 8
Expand Down
4 changes: 2 additions & 2 deletions v3/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ func Encrypt(r io.Reader, key *LocalKey, m, f, i []byte) (string, error) {
if len(f) > 0 {
final[9+tokenLen-footerLen] = '.'
// Encode footer as RawURLBase64
base64.RawURLEncoding.Encode(final[9+tokenLen-footerLen+1:], []byte(f))
base64.RawURLEncoding.Encode(final[9+tokenLen-footerLen+1:], f)
}

// No error
return string(final), nil
}

// PASETO v3 symmetric decryption primitive
// PASETO v3 symmetric decryption primitive.
// https://github.com/paseto-standard/paseto-spec/blob/master/docs/01-Protocol-Versions/Version3.md#decrypt
func Decrypt(key *LocalKey, token string, f, i []byte) ([]byte, error) {
// Check arguments
Expand Down

0 comments on commit ec3bc25

Please sign in to comment.