Namespace: rsa

crypto/pk.rsa

RSA

Source:

Methods

(static) rsa.sign(alg, msg, key) → {Buffer}

Sign message with RSA key.

Parameters:
Name Type Description
alg String

Hash algorithm.

msg Buffer

Signed message.

key Buffer

ASN1 serialized RSA key.

Source:
Returns:

Signature (DER)

Type
Buffer

(static) rsa.verify(alg, msg, sig, key) → {Boolean}

Verify RSA signature.

Parameters:
Name Type Description
alg String

Hash algorithm.

msg Buffer

Signed message.

sig Buffer

Signature.

key Buffer

ASN1 serialized RSA key.

Source:
Returns:
Type
Boolean