• 大小: 74KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-20
  • 语言: Java
  • 标签: javamail  加密  

资源简介

用java实现的对电子邮件进行加密解密及签名的算法接口,能够对发送的邮件进行加密和解密,并且能够发送和收取邮件。

资源截图

代码片段和文件信息

package mailapplet;

import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
import java.io.*;
import java.util.*;
import javax.swing.*;

public class receiveMailapplet extends applet {
  private boolean isStandalone = false;
  private Label label1 = new Label();
  private TextField textField1 = new TextField();
  private Label label2 = new Label();
  private TextField textField2 = new TextField();
  private Label label3 = new Label();
  private TextField textField3 = new TextField();
  private TextArea textArea1 = new TextArea();
  private Button button1 = new Button();
  private Button button2 = new Button();
  public static String MAIL_STORE = “pop3“;
  //Get a parameter value
  public String getParameter(String key String def) {
    return isStandalone ? System.getProperty(key def) :
      (getParameter(key) != null ? getParameter(key) : def);
  }

  //Construct the applet
  public receiveMailapplet() {
  }
  //Initialize the applet
  public void init() {
    try {
      jbInit();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }
  //Component initialization
  private void jbInit() throws Exception {
    label1.setText(“邮件服务器地址“);
    label1.setBounds(new Rectangle(54 25 94 27));
    this.setLayout(null);
    textField1.setBounds(new Rectangle(151 25 174 28));
    label2.setText(“用户名“);
    label2.setBounds(new Rectangle(53 61 43 26));
    textField2.setBounds(new Rectangle(151 63 174 29));
    label3.setText(“密码“);
    label3.setBounds(new Rectangle(52 102 33 25));
    textField3.setEchoChar(‘*‘);
    textField3.setBounds(new Rectangle(151 101 175 29));
    textArea1.setEditable(false);
    textArea1.setBounds(new Rectangle(13 184 551 365));
    button1.setLabel(“登录“);
    button1.setBounds(new Rectangle(143 142 77 28));
    button1.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        button1_actionPerformed(e);
      }
    });
    button2.setLabel(“重写“);
    button2.setBounds(new Rectangle(237 142 77 28));
    button2.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        button2_actionPerformed(e);
      }
    });
    this.add(label1 null);
    this.add(textField1 null);
    this.add(label2 null);
    this.add(textField2 null);
    this.add(label3 null);
    this.add(textField3 null);
    this.add(textArea1 null);
    this.add(button1 null);
    this.add(button2 null);
  }
  //Start the applet
  public void start() {
  }
  //Stop the applet
  public void stop() {
  }
  //Destroy the applet
  public void destroy() {
  }
  //Get applet information
  public String getappletInfo() {
    return “applet Information“;
  }
  //Get parameter info
  public String[][] getParameterInfo() {
    return null;
  }
  //Main method
  public static void main(String[] args) {
    receiveMailapplet 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     15872  2002-11-01 07:32  javaMail编程实例\mailapplet\Thumbs.db

     文件       2631  2002-10-27 20:32  javaMail编程实例\mailapplet\mailapplet.jpx

     文件       7023  2002-10-27 20:44  javaMail编程实例\mailapplet\src\mailapplet\receiveMailapplet.java

     文件       6255  2002-10-27 20:18  javaMail编程实例\mailapplet\src\mailapplet\sendMailapplet.java

     目录          0  2005-10-04 09:13  javaMail编程实例\mailapplet\src\mailapplet

     目录          0  2005-10-04 09:13  javaMail编程实例\mailapplet\src

     文件        450  2002-11-05 21:15  javaMail编程实例\mailapplet\classes\receiveMailapplet.html

     文件        450  2002-10-27 20:20  javaMail编程实例\mailapplet\classes\receiveMailapplet.html~1~

     文件        735  2002-11-01 05:40  javaMail编程实例\mailapplet\classes\mailapplet\receiveMailapplet$1.class

     文件        735  2002-11-01 05:40  javaMail编程实例\mailapplet\classes\mailapplet\receiveMailapplet$2.class

     文件        869  2002-11-01 05:40  javaMail编程实例\mailapplet\classes\mailapplet\receiveMailapplet$3.class

     文件       8237  2002-11-01 05:40  javaMail编程实例\mailapplet\classes\mailapplet\receiveMailapplet.class

     文件        717  2002-11-01 05:40  javaMail编程实例\mailapplet\classes\mailapplet\sendMailapplet$1.class

     文件        717  2002-11-01 05:40  javaMail编程实例\mailapplet\classes\mailapplet\sendMailapplet$2.class

     文件        860  2002-11-01 05:40  javaMail编程实例\mailapplet\classes\mailapplet\sendMailapplet$3.class

     文件       6757  2002-11-01 05:40  javaMail编程实例\mailapplet\classes\mailapplet\sendMailapplet.class

     目录          0  2005-10-04 09:13  javaMail编程实例\mailapplet\classes\mailapplet

     目录          0  2005-10-04 09:13  javaMail编程实例\mailapplet\classes

     目录          0  2005-10-04 09:13  javaMail编程实例\mailapplet

     文件       2588  2002-09-24 22:13  javaMail编程实例\receivemail\receivemail.jpx

     文件       3413  2002-10-23 22:22  javaMail编程实例\receivemail\src\receivemail\Receive.java

     目录          0  2005-10-04 09:13  javaMail编程实例\receivemail\src\receivemail

     目录          0  2005-10-04 09:13  javaMail编程实例\receivemail\src

     文件       3968  2002-10-10 10:23  javaMail编程实例\receivemail\classes\receivemail\Receive.class

     目录          0  2005-10-04 09:13  javaMail编程实例\receivemail\classes\receivemail

     目录          0  2005-10-04 09:13  javaMail编程实例\receivemail\classes

     目录          0  2005-10-04 09:13  javaMail编程实例\receivemail

     文件       2675  2002-10-09 21:00  javaMail编程实例\receivemail_authentic\receivemail_authentic.jpx

     文件       1856  2002-10-10 11:42  javaMail编程实例\receivemail_authentic\src\receivemail_authentic\MailAuthenticator.java

     文件       3148  2002-10-23 23:44  javaMail编程实例\receivemail_authentic\src\receivemail_authentic\Receive.java

............此处省略48个文件信息

评论

共有 条评论