Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 05-24-2006, 08:37 AM Encrption in HTML
Novice Talker

Posts: 6
Trades: 0
Hello,
I need to encrypt a word in HTML, how to do it?
if i give letter A then the answer should be some other word .
how to do it ?

thanks,
Jayender
jayender is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-24-2006, 08:47 AM Re: Encrption in HTML
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
you can't in HTML
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-24-2006, 08:53 AM Re: Encrption in HTML
Novice Talker

Posts: 6
Trades: 0
Is there any other way?
Please like java script ?
jayender is offline
Reply With Quote
View Public Profile
 
Old 05-24-2006, 09:02 AM Re: Encrption in HTML
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
it's possible in javascript

but pointless and why would you want to anyway?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-24-2006, 09:06 AM Re: Encrption in HTML
Novice Talker

Posts: 6
Trades: 0
Hey thats fine dude..
i need to do it .. thats all.. what makes u to say point less?
I am new to this .. but worth it doing i felt ..

waiting for the solution
thanks,
Jay
jayender is offline
Reply With Quote
View Public Profile
 
Old 05-24-2006, 09:12 AM Re: Encrption in HTML
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
What exactly do you need to encrypt, and what sort of encryption do you need?

There's a number of different types of encryption and ways of implementing them (such as private/public key cryptography for transfering encrypted messages over an insecure medium, one way MD5/SHA-1/etc hashing for secure password authentication and checksums, simple password protected encryption for example to put a password on a file, plus a number of simple substitution algorythems you can use)

If you have no idea, let us know what you're trying to do, and how secure it needs to be, and we can suggest an encryption method and possibly a way of implementing it.

- Mina
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 05-24-2006, 09:16 AM Re: Encrption in HTML
Novice Talker

Posts: 6
Trades: 0
Well .. i have a text box .. and in that i will enter a letter say"A" and in return there should be a message box saying the encrypted value say "J".
this is just a sample project wihich will help me latter

waiting for ur response.
thanks,
jayender
jayender is offline
Reply With Quote
View Public Profile
 
Old 05-24-2006, 10:47 AM Re: Encrption in HTML
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Do you want decryption as well?
How secure does it need to be? (What's it being used for?)
Is it only single letters, or do you want to encrypt words, blocks of text, or even files?
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 05-25-2006, 05:19 AM Re: Encrption in HTML
Novice Talker

Posts: 6
Trades: 0
Thanks for the reply Minaki,
well this is for my learning so just want to know how to encrypt a letter in Javascript... i know in C++... but am new to javascript ...
hope i will get the code pretty soon ..

Last edited by jayender; 05-25-2006 at 07:37 AM..
jayender is offline
Reply With Quote
View Public Profile
 
Old 05-25-2006, 11:33 AM Re: Encrption in HTML
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
The XOR '^' does not work as it does in C++, also using Jscript your exposing your encryption technique + your key to whom ever is looking at that page.

Thats why its pointless.

However simple char exchanges are quite easy to do. Build an array of alpha chars. You get your char.value from your page and swap it for char_array[n] depending on what N is.

Of course you will need to roll back to 1 if you hit 26 etc but thats a basic substitution method that is not too hard to work out.

Example:

Code:
<script>
var subs = 15;
var chars = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
var alength = chars.length;
var j=0;
var conv;

function swapChar(ch){

	for(i=0;i<alength;i++){

		if(ch == chars[i]){
			document.write("found " + ch + " Converting ");

			if(i + subs > 26){
				j=0;
				tmp = 26 - i;
				conv = chars[(j + subs) - tmp];
			}else{
				conv = chars[j + subs - 1];
			}
			document.write(ch + " + " + subs + " Now == " + conv + "<br />");
		}
		j++;
	}
	
}

swapChar('z');  // should be o
document.write('<hr>');
swapChar('c'); // should be r
document.write('<hr>');
swapChar('u');// should be
document.write('<hr>');
swapChar('p');// should be
document.write('<hr>');
swapChar('q');// should be f
document.write('<hr>');
</script>
Of course to enable it to decode will be down to some coding by yourself. (a quick tip been its the opposite of ^)

But as I mention doing this in Jscript is totally behond reason!

Ibbo
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf

Last edited by ibbo; 05-25-2006 at 11:36 AM..
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Old 05-26-2006, 03:41 AM Re: Encrption in HTML
Novice Talker

Posts: 6
Trades: 0
Thanks a lot dude ...
jayender is offline
Reply With Quote
View Public Profile
 
Old 05-26-2006, 05:25 AM Re: Encrption in HTML
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
A pleasure

Ibbo
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Reply     « Reply to Encrption in HTML
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.72943 seconds with 12 queries