build/authorify.js
function (data, scheme) {
      // scheme = RSA-OAEP, RSAES-PKCS1-V1_5
      scheme = scheme || SCHEME;
      return forge.util.encode64(this._cert.publicKey.encrypt(data, scheme));
    }
function (data, scheme) {
      // scheme = RSA-OAEP, RSAES-PKCS1-V1_5
      scheme = scheme || SCHEME;
      return forge.util.encode64(this._cert.publicKey.encrypt(data, scheme));
    }
function ( data , scheme ) { // scheme = RSA-OAEP, RSAES-PKCS1-V1_5 scheme = scheme || SCHEME ; return forge . util . encode64 ( this . _cert . publicKey . encrypt ( data , scheme ) ) ; }
Encrypt data using RSA public key inside the X.509 certificate
@param {String} data The data to encrypt
@param {String} [scheme='RSA-OAEP'] The scheme to be used in encryption.
Use 'RSAES-PKCS1-V1_5' in legacy applications.
@return {String} The RSA encryption result in Base64
Encrypt data using RSA public key inside the X . 509 certificate