This avoids cloning the object to compute the hashes or the signatures.
ruma-signatures provides functionality for creating digital signatures according to the Matrix specification.