A signed message does not always have to contain the public key within the object since the key may be retrieved from IVault in some cases
Example:
public interface ISessionless {
//...
// > this uses ISessionless.GetKeys to get the public key in a scene where a signed message has no public key attached to it
public bool VerifySignature(SignedMessage);
//...
These model classes only ensure format, not correctness.
SignedMessageWithKey will make sure that the key is made up of a string of bytes
Note 2:
! This contains breaking changes for SignedMessage since PublicKey property has been removed (use SignedMessageWithKey for identical behavior as the outdated SignedMessage, or SignedMessageWithECKey if you got EC public key objects)
Sign and VerifySignature functions are chained respectively
so the 1st would call return the 2nd, 3rd...
Example:
Sign(string) will do work then return Sign(string, string) to continue the process which will return Sign(string, ECPrivateKeyParameters) which will return the final result
Same with VerifySignature
The more useful parameters you provide, the less work they have to do (call the 3rd for the least amount of work required by each of them)
Sorry for the amount of commits, I decided to make the PR even tho it contains the merged commits along with the new ones since I spent too many hours for 2days on this and failed to fix it
A signed message does not always have to contain the public key within the object since the key may be retrieved from
IVault
in some casesExample:
SignedMessage
Note:
Note 2:
ISessionless
Note:
Sorry for the amount of commits, I decided to make the PR even tho it contains the merged commits along with the new ones since I spent too many hours for 2days on this and failed to fix it