TBD54566975 / web5-go

Apache License 2.0
6 stars 6 forks source link

Narrow `jws.Payload` type from `any` to `[]byte` #114

Closed mistermoe closed 3 months ago

mistermoe commented 3 months ago

Summary

Narrows type of jws.Payload type from any to []byte

Rationale

The current implementation naively attempts to json.Marshal payload but it's not always the case that the payload being signed will be or should be json serializable. e.g. payload for tbdex message signatures is a sha256 digest. Further, the jws rfc considers payload to be a sequence of octets.

image

Reference