Algorithms

An algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.

Share tech news, updates, or what's on your mind.

Sign up to Post

I need to create a language agnostic hashing algorithm for a custom PHP-based application that I'm developing.  

The reason it needs to be language agnostic is because the PHP application that I'm developing needs to be able to communicate with another 3rd party application (hosted on Heroku) .. and both applications need to be able to apply the same exact algorithm.

I understand that its considered bad practice to use a hardcoded SALT value when applying hashing algorithms, but in this particular scenario, I suspect that it may be unavoidable.  I'm all ears, however.  Still .. let me explain what it is that I need to do first.

Here's what I currently have set up in my PHP application:

$param1= 'beta';
$param2= 'noodle';
$param3= '1502719494';
$hashstring = $param1. $param2. '-' . $param3;  
$options = [
  'cost' => 10,
  'salt' => 'Dk2jdfPIJFddf32948jdfg809fiejf',
];      
echo password_hash($hashstring, PASSWORD_BCRYPT, $options);

Open in new window


What I'd like to do is to somehow re-write this in a way where it could be interpreted universally in pretty much any programming language, .. but where they can both use the same hardcoded SALT value, and both return the exact same result.  The Heroku application is apparently a Node.js powered application (written in Google V8 JavaScript) .. if that information helps any.  

Anyways, .. I'd be interested to hear anyone's thoughts regarding what I'm trying to accomplish here.

Thanks,
- Yvan
0
[Webinar] Lessons on Recovering from Petya
LVL 9
[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Imagine you have a dataset of rowers. You have X variables such as weight, benchpress, deadlift, squat, nutrition, etc. You also have each rower's lap time.

Now, let's say for a given rower, you want to optimize her lap time, but you can only train along ONE DIMENSION. How would you identify the best attribute to optimize?

I thought about a grid search, but that seems awful. Which family of machine learning algorithms would be best for this type of problem, and how would you attack it?

Thanks a million!
0
I have question about the GA application in an intrusion detection, what programming language can be applied for this type of problem.
0
How to disable disable any 96-bit hmac algorithms in centos
0
Hi
I am working on GIS applications and found the slope algorith in the net :

ftp://ftp.ecn.purdue.edu/jshan/86/help/html/gmd/slope_percent.htm

attached is an example I used to apply the above algorithm for calculating slopes from a DEM. I am not good in math so I got two results.
Can you help me please . I got 73, -33, 56.648 and I do not how to do the arctan.
slope.doc
slope.doc
0

Algorithms

An algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.

Top Experts In
Algorithms
<
Monthly
>