473,406 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Hashing Function in PERL

Hi all,

I have to write a simple script (PHP or Perl) which takes in certain parameters, appends them and hashes them using SHA or SHA1 (or even MD5 is also ok) and spits out the hashed value. But the catch is, this script (may be sitting on a web server or something) has to be accessible by any application desired. some xyz app say written in .net or php or VB or any abc s/w should be able to access this script and get the hashed value. I'm fairly New to Perl and have a lot of questions:
First of all, How do I write the script to accomplish this feature?

What is this script? Meaning, is this a function or what is this? and if it is a function, is it stand alone? Can we just have stand alone scripts sitting on server? Will that work? If not, how to make it work?

Where should I put this script on the web server so that everyone can access this.

How can any app access this? I mean, the method. Do they call this function from their app or what do they have to do?
I know there are too many questions but i never ever wrote a perl script in my life. This si the first. i'm reading some tutorials and getting along, but these are such details that never appear on any tutorials. So any help is greatly appreciated. Thanks you all a lot.

- Vamsi
Mar 29 '07 #1
6 1383
KevinADC
4,059 Expert 2GB
How is it you have to do something for which you apparently have no education, training or experience? What type of programing experience do you have?
Mar 29 '07 #2
How is it you have to do something for which you apparently have no education, training or experience? What type of programing experience do you have?
I'm a database guy Kevin. I will have to do this because i was asked to do this. Is it that difficult which made you ask this question??
Mar 29 '07 #3
KevinADC
4,059 Expert 2GB
Well, I don't know, but you said:


I never ever wrote a perl script in my life.

So for you I would say it's going to be impossible at this point. Whats the time frame you have to get this done?
Mar 29 '07 #4
Well, I don't know, but you said:





So for you I would say it's going to be impossible at this point. Whats the time frame you have to get this done?
By Tomorrow morning. Atleast can you get me started? It's not that i'm completely new to programming. I know some php, vb, c# etc..but perl --first time. If you could show methe way then i'll fight it out and see what i can do. Thanks.
Mar 29 '07 #5
KevinADC
4,059 Expert 2GB
First of all, How do I write the script to accomplish this feature?

To write perl scripts, use any text editor that saves them in plain text format (ASCII).

What is this script? Meaning, is this a function or what is this? and if it is a function, is it stand alone? Can we just have stand alone scripts sitting on server? Will that work? If not, how to make it work?

It's a script, how you use it or call it or whatever depends on whats calling it, what it does, etc etc etc.

Where should I put this script on the web server so that everyone can access this.

If you mean for internet use, normally that would be the cgi-bin but it could any folder. Then you access the script via CGI forms or query string requests.

How can any app access this? I mean, the method. Do they call this function from their app or what do they have to do?

Apps access it using whatever functions or interface they have to run external programs. Command line interface could be like:

perl nameofscript.pl <list of arguments to pass to script>
Mar 30 '07 #6
KevinADC
4,059 Expert 2GB
How'd it go? Did you get it done?
Mar 30 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Pat | last post by:
I want to look for some one-to-one hashing function. In C++, any one-to-one hashing function?
2
by: Matt Bull | last post by:
Hi, I apologise in advance if this is off topic, but would appreciate any pointers you chaps might be able to provide. I'm relatively novice in the art of C so am after any suggestions about...
11
by: Wm. Scott Miller | last post by:
Hello all! We are building applications here and have hashing algorithms to secure secrets (e.g passwords) by producing one way hashes. Now, I've read alot and I've followed most of the advice...
10
by: Dino M. Buljubasic | last post by:
Hi, I am using MD5 to hash my passwords and add them to database as hashed. I have noticed though that some passwords don't get recognized and I suppose that it happen because hashing might...
19
by: Ole Nielsby | last post by:
How does the GetHashCode() of an array object behave? Does it combine the GetHashCode() of its elements, or does it create a sync block for the object? I want to use readonly arrays as...
6
by: Jayender | last post by:
Hi, What is the difference between Hashing and Encryption ?
4
by: wkatz | last post by:
Hi, Gurus. What hashing algorithm outputs hash value as numbers only? For example, if you pass a “John Q. Public” it will output 23324. If there is no such hashing, how hard is it to hire somebody to...
11
by: January Weiner | last post by:
Hello, I need to use a hashing function for relatively short strings (roughly 16 characters or less). The data that needs to be accessed via hash is just a simple int. I just need to look up...
15
by: Vinodh | last post by:
I am reading about hashing techniques. The map data structure available in C++ STL uses hashing techniques?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.