encode Signed Payload
Encodes raw bytes to strkey signed payload (P...)
The framing data carries is checked here as well as on decode, so every string this function returns is one decodeSignedPayload accepts.
Return
The encoded strkey, 69 to 165 characters long
Parameters
data
The 32-byte ed25519 public key, the declared payload length as a big-endian four-byte value, and the payload padded with zeros to a four-byte boundary
Throws
if data is outside 40 to 100 bytes, declares a payload length outside 1 to 64, has a size that does not fit its declared payload length exactly, or leaves a padding byte after the payload non-zero