473,804 Members | 4,288 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

en- and decrypting

Hi Guys,

i've found a small java script function that simple
decrypts some encodedtext to plaintext.

function decrypt(t,k){
var y=0;
var r='';
t=unescape(t);
for (i=0;i<t.length ;i++){
x=k.charCodeAt( y);
x2=t.charCodeAt (i);
if(x!=x2){
r=r+String.from CharCode(x2^x);
}';x+='else{
r=r+String.from CharCode(x);
}
y++;
if(y==k.length) {
y=0;
}
}return(escape( r));
}

the problem is that i don't have the
encrypt function. i tried it by my own,
but i'm a noob using javascript in this way

can somebody help me to write this
encrypt function?
regards
Jul 23 '05 #1
1 1233
checksumde wrote:
Hi Guys,

i've found a small java script function that simple
decrypts some encodedtext to plaintext.


Have you seen these?

http://javascript.internet.com/passw...cryption4.html

http://www.aardwulf.com/cipher/aardSaber.asp

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
7707
by: Alessandro Bottoni | last post by:
I know you will shake you head sadly but... I really have to perform such a suicidal task (even if for a short time and just for internal use). I have to send by email (over the open internet) a XML file containing _system commands_ (yes: the kind of stuff like "rm -dfr /") to a server and have a Python program sitting on this server, fetching and parsing the e-mail message and executing the commands (maybe with _root privileges_). Of...
3
4613
by: JW | last post by:
I can encrypt the contents of a memory stream with no problems, however when decrypting( I'm using the same key an IV ) I get an exception stating bad data. I'm at a lost. I'm actually creating a new memory stream, filling it with the encrypted bytes then trying to read from the crypto stream object. I have used the same approach encrypting to a file handle and then decrypting from the same file and it works.
0
1524
by: cmrchs | last post by:
Hi, Using the RSA-crypto algorithm in .NET , when actually encrypting/decrypting, all the code samples I ran into always used something like, to encrypt : // create keypair and store in container CspParameters param = new CspParameters(); param.KeyContainerName = "NewKeyContainer"; param.Flags = CspProviderFlags.UseMachineKeyStore; RSACryptoServiceProvider rsaObj = new RSACryptoServiceProvider(param);
3
14019
by: James | last post by:
Hi, I am developing a ActiveX Control which will be used in a web page. The control will encrypt some value then decrypt it when the web page opens next time. I tested the control in a windows application and it works fine and no error jumps. However, when I tried to use it in a web page, problems came. There is no problem for encrypting but the decrypting can't be finished. The error jumped from the line below
1
1321
by: Yair Nissan | last post by:
Hi, I'm trying to find a way to encrypt data (strings) from my client application (c++ 6.0) and transfer it to my server's .Net web services application. The web services must be able to decrypt the data, make some manipulations on the decrypted data, encrypt the result, send it back to the client who would decrypt it again. Thanks, YN
0
1381
by: cmrchs | last post by:
Hi, Using the RSA-crypto algorithm in .NET , when actually encrypting/decrypting, all the code samples I ran into always used something like, to encrypt : ' create keypair and store in container Dim param As New CspParameters param.KeyContainerName = "NewKeyContainer" param.Flags = CspProviderFlags.UseMachineKeyStore Dim rsaObj As New RSACryptoServiceProvider(param)
3
2886
by: dfa_geko | last post by:
Hi All, I had a question about encrypting and decrypting XML files using asymmetric keys. I copied some sample code from MSDN, here are the samples: http://msdn2.microsoft.com/en-us/library/ms229746.aspx http://msdn2.microsoft.com/en-us/library/ms229919.aspx The samples I used are the ones near the bottom of the page. (With a slight modification of moving edElement.KeyInfo.AddClause(new KeyInfoEncryptedKey
5
3447
by: Harb247 | last post by:
Hi Guys, First Post. Need some help decrypting a String / DB The company i manage recently had an argument with their lead programmer for their data base. However he has decided to have nothing to do with the company so i cannot contact him to get the info i require. Ive looked over his computer and accessed the .dat (I have no idea why its a .dat file) file using the password however when i open it up in Access i can view the data with...
4
5705
by: Fritjolf | last post by:
Hi. I've got a strange problem... I've made a simple program to test encryption/decryption. I use Rijndael encryption and here are the most important properties. RijndaelManaged cipher = new RijndaelManaged(); cipher.KeySize = 256; cipher.BlockSize = 256;
2
4704
by: prasath03 | last post by:
Hi, I wrote a java program for Encrypt and Decrypt the given string, when i execute the program it show me an error....but the string has Encrypted, if i want to Decrypt the string it show me an error... The error is: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher Encoded: --> pLqxYQViK5U Decoded: --> null
0
9710
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10593
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10329
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9163
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7626
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.