code: function modPow(x, e, m) {
      var logger = getLogger('utility.aesDecrypt');
      var bigX = (typeof x === 'number') ? new BigInteger(x + '', 10) : new BigInteger(x.toString('hex'), 16);
      var bigE = (typeof e === 'number') ? new BigInteger(e + '', 10) : new BigInteger(e.toString('hex'), 16);
      var bigM = (typeof m === 'number') ? new BigInteger(m + '', 10) : new BigInteger(m.toString('hex'), 16);
      var bigResult = bigX.modPow(bigE, bigM);
      if (logger.isDebugEnabled()) {
          logger.debug('X = %s, E = %s, M = %s, result = %s', bigX, bigE, bigM, bigResult);
      }
      var result = new Buffer(bigResult.toByteArray());
      if (result.length > 256) {
          result = result.slice(result.length - 256);
      }
      return result;
  }
docs: Mod Pow