-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #316 from willmeister/feat/315/SignatureVerification
315 Adding signature verification stub
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Checks that the message with the provided signature was signed by the private key | ||
* associated with the provided public key. | ||
* | ||
* @param signature the signed message | ||
* @param message the message in question | ||
* @param publicKey the public key to check the signature against | ||
* @returns true if the signature matches the message when decrypted by the publicKey | ||
*/ | ||
export const verifySignature = ( | ||
signature: any, | ||
message: any, | ||
publicKey: any | ||
): boolean => { | ||
// TODO: Make this do actual signature checking | ||
return signature === publicKey | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters