As per what i understand you want to use java progam then you can use like this:-
here com.test.TestJavaProjet is the Java class
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="com.test.TestJavaProjet" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%TestJavaProjet a = new TestJavaProjet();
%>
</body>
</html>
This is just a demo.
Please give your code snippet and explain more about your problem so that we can help further and guide.
IIM
Practically a Master Poster
638 posts since Jun 2011
Reputation Points: 127
Solved Threads: 136
Skill Endorsements: 7
You have to do two things:-
1) Make encrypt() ,decrypt() public
public static void decrypt(InputStream is, OutputStream os)
public static void encrypt(InputStream is, OutputStream os) {
2)Call decrypt method to decrypt file
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="com.test.EncryptDecryptFileStreamWithDES" %>
<%@ page import="java.io.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%EncryptDecryptFileStreamWithDES a = new EncryptDecryptFileStreamWithDES();
a.decrypt(new FileInputStream("E:/encrypted.dat"), new FileOutputStream("E:/cleartext-reversed.xlsx"));
%>
</body>
</html>
Hope you have mail server setup.Then just send the mail with URL of the location of your file and when user clicks on that,decrypt it.
IIM
Practically a Master Poster
638 posts since Jun 2011
Reputation Points: 127
Solved Threads: 136
Skill Endorsements: 7