Canonical signed bytes: payload bytes followed by the raw signature.
(&self)
| 482 | |
| 483 | /// Canonical signed bytes: payload bytes followed by the raw signature. |
| 484 | pub fn encode(&self) -> Vec<u8> { |
| 485 | let mut bytes = Vec::with_capacity(self.payload_bytes.len() + self.signature.len()); |
| 486 | bytes.extend_from_slice(&self.payload_bytes); |
| 487 | bytes.extend_from_slice(&self.signature); |
| 488 | bytes |
| 489 | } |
| 490 | |
| 491 | /// The binding id over the canonical signed bytes. |
| 492 | pub fn id(&self) -> BindingId { |