You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage/signing_methods.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,8 @@ Each signing method expects a different object type for its signing keys. The fo
36
36
[^rsapss]: [Section 3.2 of RFC 7518](https://datatracker.ietf.org/doc/html/rfc7518#section-3.5)
37
37
[^eddsa]: [Section 3.1 of RFC 8037](https://datatracker.ietf.org/doc/html/rfc8037#section-3.1)
38
38
39
+
## Frequently Asked Questions
40
+
39
41
**Why is the HMAC signing method not accepting `string` as a key type?**
40
42
41
43
We often get asked why the HMAC signing method only supports `[]byte` and not `string`. This is intentionally and there are different reasons for doing so. First, we aim to use the key type that the underlying cryptographic operation in the Go library uses (this also applies to the other signing methods). In case of HMAC, this is [`hmac.New`](https://pkg.go.dev/crypto/hmac#New) and it uses `[]byte` as the type to represent a key.
0 commit comments