Skip to content

Commit c88a5c5

Browse files
committed
faq
1 parent df15149 commit c88a5c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/usage/signing_methods.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Each signing method expects a different object type for its signing keys. The fo
3636
[^rsapss]: [Section 3.2 of RFC 7518](https://datatracker.ietf.org/doc/html/rfc7518#section-3.5)
3737
[^eddsa]: [Section 3.1 of RFC 8037](https://datatracker.ietf.org/doc/html/rfc8037#section-3.1)
3838

39+
## Frequently Asked Questions
40+
3941
**Why is the HMAC signing method not accepting `string` as a key type?**
4042

4143
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

Comments
 (0)