Skip to content

Commit 6918d40

Browse files
committed
Remove []'s from PAE() function.
Originally, the document used `PAE([...])` since the PASETO PAE takes a single array of strings as an argument. But there is no need for this documentation compatibility, and the extra []'s just add visual clutter. It is clearer to remove them.
1 parent 052eceb commit 6918d40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

specification.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The signature format is a JSON message of the following form:
3434
"payloadType": "<PAYLOAD_TYPE>",
3535
"signatures": [{
3636
…,
37-
"sig": "<Base64(Sign(PAE([UTF8(PAYLOAD_TYPE), SERIALIZED_BODY])))>"
37+
"sig": "<Base64(Sign(PAE(UTF8(PAYLOAD_TYPE), SERIALIZED_BODY)))>"
3838
}, ]
3939
}
4040
```
@@ -60,7 +60,7 @@ where:
6060
where parameters `type` and `body` are byte sequences:
6161

6262
```none
63-
PAE([type, body]) := le64(2) || le64(len(type)) || type || le64(len(body)) || body
63+
PAE(type, body) := le64(2) || le64(len(type)) || type || le64(len(body)) || body
6464
le64(n) := 64-bit little-endian encoding of `n`, where 0 <= n < 2^63
6565
```
6666
@@ -80,7 +80,7 @@ where:
8080
To sign:
8181
8282
- Serialize BODY according to PAYLOAD_TYPE. Call the result SERIALIZED_BODY.
83-
- Sign PAE([UTF8(PAYLOAD_TYPE), SERIALIZED_BODY]), base64-encode the result,
83+
- Sign PAE(UTF8(PAYLOAD_TYPE), SERIALIZED_BODY), base64-encode the result,
8484
and store it in `sig`.
8585
- Base64-encode SERIALIZED_BODY and store it in `payload`.
8686
- Store PAYLOAD_TYPE in `payloadType`.
@@ -89,7 +89,7 @@ To verify:
8989
9090
- Base64-decode `payload`; call this SERIALIZED_BODY. Reject if the decoding
9191
fails.
92-
- Base64-decode `sig` and verify PAE([UTF8(PAYLOAD_TYPE), SERIALIZED_BODY]).
92+
- Base64-decode `sig` and verify PAE(UTF8(PAYLOAD_TYPE), SERIALIZED_BODY).
9393
Reject if either the decoding or the signature verification fails.
9494
- Parse SERIALIZED_BODY according to PAYLOAD_TYPE. Reject if the parsing
9595
fails.

0 commit comments

Comments
 (0)