Class RSAKey
Defined in: rsasign-1.2.js.
Constructor Attributes | Constructor Name and Description |
---|---|
RSAKey()
Tom Wu's RSA Key class and extension
|
Method Attributes | Method Name and Description |
---|---|
readPrivateKeyFromPEMString(keyPEM)
read PKCS#1 private key from a string
|
|
signString(s, hashAlg)
sign for a message string with RSA private key.
|
|
verifyString(sMsg, hSig)
verifies a sigature for a message string with RSA public key.
|
Method Detail
readPrivateKeyFromPEMString(keyPEM)
read PKCS#1 private key from a string
Defined in: rsapem-1.1.js.
Defined in: rsapem-1.1.js.
- Parameters:
- {String} keyPEM
- string of PKCS#1 private key.
signString(s, hashAlg)
sign for a message string with RSA private key.
- Parameters:
- {String} s
- message string to be signed.
- {String} hashAlg
- hash algorithm name for signing.
- Returns:
- returns hexadecimal string of signature value.
verifyString(sMsg, hSig)
verifies a sigature for a message string with RSA public key.
- Parameters:
- {String} sMsg
- message string to be verified.
- {String} hSig
- hexadecimal string of siganture.
non-hexadecimal charactors including new lines will be ignored.
- Returns:
- returns 1 if valid, otherwise 0