Skip to content

Commit 1538663

Browse files
author
BAM5
committed
Major overhaul to add schemes. Everything should be backwards compatible.
1 parent 2c2ce47 commit 1538663

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/libs/rsa.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,15 @@
4444
*
4545
* Modified Key object to accept a padding key in it's options object.
4646
* padding key's value may be any object with the appropriate properties & method signatures:
47+
* Encryption Schemes
4748
* maxMessageLength(key:RSA.Key):uint
4849
* encrypt(key:RSA.Key, message:Buffer):Buffer
4950
* decrypt(key:RSA.Key, encryptedMessage:Buffer):Buffer
50-
* sign(key:RSA.key, data:Buffer, hash:String):Buffer
51+
*
52+
* Signature Schemes
53+
* sign(key:RSA.Key, data:Buffer):Buffer
54+
* verify(key:RSA.Key, data:Buffer, signature:Buffer):Boolean
55+
*
5156
* If a padding scheme has options then the padding value can be an instantiated class.
5257
* This allows for future changes by making it easy to add new schemes.
5358
* This also allows for users to implement their own padding schemes, although not recommended.

0 commit comments

Comments
 (0)