src/Hasher.php
public function salt(int $length = 32): string {
    try {
      return random_bytes($length);
    } catch(Exception $e) {
      throw new RuntimeException('Could not generate crytographically secure salt', 0, $e);
    }
  }
public function salt(int $length = 32): string {
    try {
      return random_bytes($length);
    } catch(Exception $e) {
      throw new RuntimeException('Could not generate crytographically secure salt', 0, $e);
    }
  }
public function salt ( int $ length = 32 ) : string { try { return random_bytes ( $ length ) ; } catch ( Exception $ e ) { throw new RuntimeException ( 'Could not generate crytographically secure salt' , 0 , $ e ) ; } }
Generate a cryptographically secure salt

@param  int $length (optional) The length of the salt

@return  string  A string of cryptographically random bytes of `$length` length
Generate a cryptographically secure salt