models/Person.js
/**
   * generates random string of characters i.e salt
   * @function
   * @param {number} length - Length of the random string.
   */
generates random string of characters i.e salt
@function
@param {number} length - Length of the random string.
generates random string of characters i . e salt @function @param { number } length - Length of the random string .
genRandomString (length){
    return crypto.randomBytes(Math.ceil(length/2))
              .toString('hex') 
              .slice(0,length);   
  }
genRandomString ( length ) { return crypto . randomBytes ( Math . ceil ( length / 2 ) ) . toString ( 'hex' ) . slice ( 0 , length ) ; }
generates random string of characters i.e salt
 @function
 @param {number} length - Length of the random string.
generates random string of characters i . e salt @function @param { number } length - Length of the random string .
/** convert to hexadecimal format */ /** return required number of characters */