Salman Moha

Greenhorn
+ Follow
since Jul 19, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Salman Moha

Rob Prime wrote:Have you tried the same in Java?




I trying to implement this in java.

private readonly byte[] IV = new byte[8] { 240, 3, 45, 29, 0, 76, 173, 59 };



Here's is my JAVA Code but skeptical about it.

private static byte[] IV = new byte[] { (byte)240, (byte)3, (byte)45,(byte)29, (byte)0, (byte)76, (byte)173, (byte)59 };


Method:
IvParameterSpec zeroIv = new IvParameterSpec(IV, 0, 8)


Please direct me.
15 years ago
Hi there,

I'm working on Triple DES encryption with parameters in JAVA 5:

Key Size : 16 bytes
Key : This is an MD5 hash of the shared key (eg: MD5 hash of omCryptoExchange in this case)
CipherMode : CBC (Cipher Block Chaining)
Padding Mode : PKCS7

How do I create an 8- byte array initialization vector with the following values in it, { 240, 3, 45, 29, 0, 76, 173, 59 } in java.

Equivalent C++ code is

// The Initialization Vector for the DES encryption routine
private readonly byte[] IV = new byte[8] { 240, 3, 45, 29, 0, 76, 173, 59 };
15 years ago
Hi experts,
I have this requirement where I need to do implement XOR logic with the following.

Experts please let me know how to handle special characters in this decrypt method.
16 years ago
I want to design a store which has catalog (products from different manufacturers), display them. navigate them.

What is the best technology out there ? Any out of box?

thanks
17 years ago
hi there

I have an application where in the jsp page, i provide to link to OPEN a word file upload in the server. I am using <a href tag. its working good on the local machine. but when i am connecting to the server which is secured (https) its not opening.

could you help.
19 years ago
Hi there.

Its working well with the firefox browser. I checked out without XP firewall.

When I click the link to open/ download a word file, its showing the (File Download warning) content disposition window but when I click save or open,,, I get error message "Internet Explorer cannot download ...File_name.doc from Server_name.
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. "

In the content disposition window ( file download warning window), "File Name" is the filename path, and "From" is the server name/path. but nothing is displayed in "File Type"! Hope this might have something to do. Please help me out.


My code is as follows
if (!request.getScheme().equals("https"))
response.setHeader("Pragma", "no-cache");

String fileName=request.getParameter("instruction");
//filename = filename.replaceAll( "\\W*", "" ) ;
String DirName = request.getParameter("directory");
String value = (DirName+"/"+fileName);

File f = new File (value);
response.setContentType("application/msword");
//set the header and also the Name by which user will be prompted to save
response.setHeader("Content-disposition", "attachment; filename=" + fileName);
response.setHeader("Cache-Control", "cache");
response.setHeader("Cache-Control", "must-revalidate");
InputStream in = new FileInputStream(f);
out.clearBuffer();

int bit = 256;
int i = 0;

try {

while ((bit) >= 0) {
bit = in.read();

out.write(bit);
}

} catch (IOException ioe) {
ioe.printStackTrace(System.out);
}

out.flush();
out.close();
in.close();
19 years ago
I have a similar problem. When I am trying to save/open a file from server(secure) which uses HTTPS, its displaying error message:

Internet Explorer cannot download ...File_name.doc from Server_name.
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.

My code is below. Please help me out.
Its working with my localhost(http) and with Firefix browser. Its something to do with http and IE 6.


<java>
if (!request.getScheme().equals("https"))
response.setHeader("Pragma", "no-cache");

String fileName=request.getParameter("instruction");
//filename = filename.replaceAll( "\\W*", "" ) ;
String DirName = request.getParameter("directory");
String value = (DirName+"/"+fileName);

File f = new File (value);
response.setContentType("application/msword");
//set the header and also the Name by which user will be prompted to save
response.setHeader("Content-disposition", "attachment; filename=" + fileName);

InputStream in = new FileInputStream(f);
out.clearBuffer();

int bit = 256;
int i = 0;

try {

while ((bit) >= 0) {
bit = in.read();

out.write(bit);
}

} catch (IOException ioe) {
ioe.printStackTrace(System.out);
}

out.flush();
out.close();
in.close();
</java>
19 years ago
Thank So much all.

I was wondering if there is any method or class which one can write in a formhandler or somewhere (.java) to close a browser.

Anyways if i cannot use javascript then it leaves me no other options

Hi

HI THERE!

I am working on a web application where I am using parent/child windows. My application has one main window and some buttons like for adding new record, modifying new record etc. When user clicks on any button a child window opens where user enters data and upon clicking save/update button there, the page gets submitted within the child window giving him message whether save/update is successful or not. Now when he closes the child window I would like to refresh the parent window which maintains list of added records. Note that child window is not a modal window and resubmission of page is happening within the window.

I am not allowed to use any sort of JAVASCRIPT that keeps in trance.
Please help.
I have to use a formhandler to check in the form data in child window too.
19 years ago
Hi

HI THERE!

I am working on a web application where I am using parent/child windows. My application has one main window and some buttons like for adding new record, modifying new record etc. When user clicks on any button a child window opens where user enters data and upon clicking save/update button there, the page gets submitted within the child window giving him message whether save/update is successful or not. Now when he closes the child window I would like to refresh the parent window which maintains list of added records. Note that child window is not a modal window and resubmission of page is happening within the window.

I am not allowed to use any sort of JAVASCRIPT that keeps in trance.
Please help.
I have to use a formhandler to check in the form data in child window too.
19 years ago
JSP
Hi

I am working on a web application where I am using parent/child windows. My application has one main window and some buttons like for adding new record, modifying new record etc. When user clicks on any button a child window opens where user enters data and upon clicking save/update button there, the page gets submitted within the child window giving him message whether save/update is successful or not. Now when he closes the child window I would like to refresh the parent window which maintains list of added records. Note that child window is not a modal window and resubmission of page is happening within the window.

I am not allowed to use any sort of JAVASCRIPT that keeps in trance.
Please help