1

I'm working on a project for work that requires me to convert password strings to MD5 hash and I'm having trouble. I know MD5 isn't the best for this purpose, but for what we're doing it isn't a problem and its been specifically requested.

Background- I'm having trouble because the environment I'm programming in is a bit unique. I am programming a B&R PLC in ANSI C in Automation Studio 4.9. Most C functionality is available, but certain functions are lost from the standard libraries. For example there's no version of printf available for formatting strings. the largest integer data type I can use is a UDINT (variables in this environment follow IEC's plc datatypes, but it's just a 32 bit uint). This environment also does not handle function pointers well at all, so I need to avoid them the best I can. The majority of my C programming experience has been in this environment so trying to find C examples online and make them work is very difficult.

In the end I need a .c and .h file with functions that I can use between multiple projects. The input will be a string and the output is the hash string.

If anybody can help me accomplish this, it would be much appreciated. If I can provide any additional information let me know. I know this is an uncommon problem.

0 Answers0