build/authorify.js
function(secret) {
        var keyIv;
        if (!secret) {
          throw new CError('missing secret').log();
        }
        // secret is a Base64 string
        if(secret.isBase64()){
          try {
            keyIv = forge.util.decode64(secret);
          } catch (e) {
            throw new CError('secret not valid').log();
          }
        } else {
          keyIv = secret;
        }
        return keyIv;
      }
function(secret) {
        var keyIv;
        if (!secret) {
          throw new CError('missing secret').log();
        }
        // secret is a Base64 string
        if(secret.isBase64()){
          try {
            keyIv = forge.util.decode64(secret);
          } catch (e) {
            throw new CError('secret not valid').log();
          }
        } else {
          keyIv = secret;
        }
        return keyIv;
      }
function ( secret ) { var keyIv ; if ( ! secret ) { throw new CError ( 'missing secret' ) . log ( ) ; } // secret is a Base64 string if ( secret . isBase64 ( ) ) { try { keyIv = forge . util . decode64 ( secret ) ; } catch ( e ) { throw new CError ( 'secret not valid' ) . log ( ) ; } } else { keyIv = secret ; } return keyIv ; }
Get bytes from a secret key

@param {String} secret The secret in Base64 format
@return {Bytes} The secret bytes
@static
@private
Get bytes from a secret key