Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!

Muthiah Raja

Greenhorn
+ Follow
since Feb 06, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Muthiah Raja

Hello,

My system(computer) connected with LAN and my system doesn't have internet connection. But one of the system in our lan has internet connection.
I try to send, out emails(for eg <%>@yahoo.co.in)from my machine
through internet machine. But it diden't worked. For sending emails i used Java Mail API.
I don't know how to configure the internet machine.
Kindly help me.
15 years ago
I can able to find the total number of unread mail in particular inbox.But i unable to find the mail is readed mail or unreaded mail.

My requirement is only extract contents if that particular mail is
unread.

But i unable to find what are all the mails which are unreaded.

Please help me,
15 years ago
Is Blowfish and DES algorithm are same. Otherwise I want to know difference between these.

Kindly help me.
15 years ago
How to encrypt and decrypt block of bytes using Data Encryption Standard
algorithm (Using CipherOutputStream class).

I need source code for the above.

Kindly help me.
15 years ago
I am trying to assign JSP String variable to Javascript variable.
For that i use the follwing code

<% String str="Raja"; %>
var s=<%=str%>;
alert(s);

But this code is not worked.

Instead of writting var s=<%=str%>;

I try var s='<%=str%>';
I try var s="<%=str%>";

this code also not worked.

Kindly help me.
15 years ago
JSP
I am trying to assign JSP String variable to Javascript variable.
For that i use the follwing code

<% String str="Raja"; %>
var s=<%=str%>;
alert(s);

But this code is not worked.

Kindly help me.
15 years ago
JSP
I want source code for sending mail in java.
I need source code for both client/server in jms.
I want to know about working environment in jms.
please help me.
16 years ago
I am new in java cryptography.I need java source code for encrypt/decrypt of strings/bytes with rijndael algorithm.
16 years ago
/*
Program:Encryption and Decryption of String/Bytes with RSA Algorithm
--------------------------------------------------------------
While running this code following errors occurs
*/

import java.security.KeyPairGenerator;
import java.security.KeyPair;
import java.security.PublicKey;
import java.security.PrivateKey;
import javax.crypto.Cipher;
import java.security.Security;
import java.security.Provider;
import org.bouncycastle.jce.provider.BouncyCastleProvider;

public class AsymmetricCipherTest
{
private static byte[] encrypt(byte[] inpBytes, PublicKey key, String xform) throws Exception
{
Cipher cipher = Cipher.getInstance(xform);
cipher.init(Cipher.ENCRYPT_MODE, key);
return cipher.doFinal(inpBytes);
}
private static byte[] decrypt(byte[] inpBytes, PrivateKey key, String xform) throws Exception
{
Cipher cipher = Cipher.getInstance(xform);
cipher.init(Cipher.DECRYPT_MODE, key);
return cipher.doFinal(inpBytes);
}
public static void main(String args[]) throws Exception
{
Provider prov=new org.bouncycastle.jce.provider.BouncyCastleProvider();
Security.addProvider(prov);
String xform = "RSA/NONE/PKCS1PADDING";
System.out.println("First");
// Generate a key-pair
KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
kpg.initialize(512); // 512 is the keysize.
KeyPair kp = kpg.generateKeyPair();
PublicKey pubk = kp.getPublic();
PrivateKey prvk = kp.getPrivate();
byte[] dataBytes = "J2EE Security for Servlets, EJBs and Web Services".getBytes();
byte[] encBytes = encrypt(dataBytes, pubk, xform);
byte[] decBytes = decrypt(encBytes, prvk, xform);
boolean expected = java.util.Arrays.equals(dataBytes, decBytes);
System.out.println("Test " + (expected ? "SUCCEEDED!" : "FAILED!"));
}
}


/*
Error
-----

AysmmetricChipherTest.java:8: package org.bouncycastle.jce.provider.BouncyCastleProvider does not exsist
AysmmetricChipherTest.java:26: package org.bouncycastle.jce.provider.BouncyCastleProvider does not exsist
Provider prov=new org.bouncycastle.jce.provider.BouncyCastleProvider();
2 errors ^

*/

/*
If any external sofware need to support BouncyCastleProvider,send the particular package with your reply.
I request you to not only rectifying errors and also run this program succesful manner.
I need java code for running above program using DDDS algorithm.
Kindly help me through r_muthiahraja@yahoo.co.in
*/
16 years ago