Encode emits the assertion into the stream with the required separator. Errors here are always about writing given that Encode() itself cannot error.
(assert Assertion)
| 1012 | // Encode emits the assertion into the stream with the required separator. |
| 1013 | // Errors here are always about writing given that Encode() itself cannot error. |
| 1014 | func (enc *Encoder) Encode(assert Assertion) error { |
| 1015 | return enc.WriteContentSignature(assert.Signature()) |
| 1016 | } |
| 1017 | |
| 1018 | // SignatureCheck checks the signature of the assertion against the given public key. Useful for assertions with no authority. |
| 1019 | func SignatureCheck(assert Assertion, pubKey PublicKey) error { |