code stringlengths 3 1.18M | language stringclasses 1
value |
|---|---|
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
package com.google.android.webviewdemo;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.webkit.JsResult;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
/**
* Demonstrates how to embed a... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
package com.google.clickin2dabeat;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.Docu... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | Java |
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2006-2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
package anonymouschat.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.NoSuchAlgorithmExce... | Java |
package anonymouschat.utils;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
impo... | Java |
package anonymouschat.utils;
/**
* Store a set of constant variables for anonymous chat.
*
* @author hb
*
*/
public class ConstantVariables {
public static String ASYMMETRIC_CYPHER_TYPE = "RSA/ECB/OAEPWITHSHA-256ANDMGF1PADDING";
public static final String ID_FILE_NAME = "ID_HIST";
pu... | Java |
package anonymouschat.utils;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.net.Socket;
public class serverConnectionEntry implements Serializable {
private static final long serialVersionUID = -3672628034657912265L;
ObjectOutputStream socketConnection;
Long serverConnectionNumber;
... | Java |
package anonymouschat;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class NickList implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
private List<String> userIDList;
private List<String> nickNameList;
... | Java |
package anonymouschat.service;
import java.io.Serializable;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import anonymouschat.utils.Consta... | Java |
/**
*
*/
package anonymouschat.service;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.concurrent.ConcurrentHashMap;
... | Java |
package anonymouschat.service;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutput... | Java |
package anonymouschat.service;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.Socket;
import anonymouschat.messages.Message;
import anonymouschat.messages.TextMessage;
import anonymouschat.messages.serverresponses.ChatroomChangeResponse;
import anonymouschat.messages.serverres... | Java |
package anonymouschat.service;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.net.UnknownHostException;
import java.security.InvalidKeyException;
im... | Java |
package anonymouschat.client;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import anonymouschat.client.frames.ChatFrame;
import anonymouschat.messages.TextMessage;
import anonymouschat.messages.serverresponses.ChatroomChangeResponse;... | Java |
package anonymouschat.client.frames;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JButton;
import javax.swing.JLabel;
import ... | Java |
package anonymouschat.client.frames;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.FileNotFoundException;
import java.io.IOException;
import javax.swing.JButton;
import javax.swing.JFrame;
import anonymouschat.Identity;
import anonymou... | Java |
package anonymouschat.client.frames;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.io.ObjectOutputStream;
import... | Java |
package anonymouschat.client.frames;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.util.ArrayList;
import java.util.List;
import javax.sw... | Java |
package anonymouschat.client.frames;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JScrol... | Java |
package anonymouschat.client.frames;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import anonymouschat.utils.LocalFileOps;
/**
* Log Frame shows chat log with a specific user.
*
* @author hb
*
*/
public class LogFrame extends JFrame{
/**
*
*... | Java |
package anonymouschat.client;
import java.security.PublicKey;
import java.util.ArrayList;
import java.util.HashMap;
import javax.crypto.Cipher;
import anonymouschat.service.serverEntry;
import anonymouschat.utils.*;
import anonymouschat.Identity;
import anonymouschat.NickList;
import anonymouschat.client... | Java |
package anonymouschat;
import java.io.Serializable;
/**
* Identity is an object that is used to store user information.
*
* @author bh349
*
*/
public class Identity implements Serializable
{
/**
*
*/
private static final long serialVersionUID = 1L;
private String userID... | Java |
package anonymouschat.messages;
import java.io.Serializable;
public class Message implements Serializable {
/**
*
*/
private static final long serialVersionUID = -1954148520479694286L;
}
| Java |
package anonymouschat.messages;
import java.io.Serializable;
import javax.crypto.SecretKey;
public class AESkeyMessage extends Message implements Serializable {
private static final long serialVersionUID = 5674590802328543696L;
public SecretKey SharedAESKey;
}
| Java |
package anonymouschat.messages;
import java.io.Serializable;
/**
* A class representation for an actual chat message.
* It contains the destination user, chatroom, and cipher-text for the message
*
*/
public class TextMessage extends Message implements Serializable
{
private static final long serial... | Java |
package anonymouschat.messages.serverresponses;
import java.io.Serializable;
import anonymouschat.messages.Message;
public class ChatroomChangeResponse extends Message implements Serializable
{
/**
*
*/
private static final long serialVersionUID = 1L;
private boolean success;
... | Java |
package anonymouschat.messages.serverresponses;
import java.io.Serializable;
import java.util.List;
import anonymouschat.messages.Message;
/**
* Server sends an instance of this to client. Client refreshes chat member
* panel.
*
* @author bh349
*
*/
public class ChatroomMemberResponse extends M... | Java |
package anonymouschat.messages;
import java.io.Serializable;
public class ServerAnnounceMessage extends Message implements Serializable
{
private static final long serialVersionUID = 2188148542441890727L;
private String name;
public ServerAnnounceMessage( String nameIn ) {
this.setNam... | Java |
package anonymouschat.messages.clientrequests;
import java.io.Serializable;
/**
* client sends an instance of this to server, indicating chat room change.
* server creates new chat room if dst is an inexisting chat room.
*
* @author bh349
*
*/
public class ChatroomChangeRequest extends ClientRequ... | Java |
package anonymouschat.messages.clientrequests;
public class UserLoginRequest extends ClientRequest
{
/**
*
*/
private static final long serialVersionUID = 1L;
public UserLoginRequest( String userID ) {
super( userID );
}
}
| Java |
package anonymouschat.messages.clientrequests;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.spec.... | Java |
package anonymouschat.messages.clientrequests;
public class RequestServerCertificate {
}
| Java |
package anonymouschat.messages.clientrequests;
import java.io.Serializable;
import anonymouschat.messages.Message;
public abstract class ClientRequest extends Message implements Serializable {
private static final long serialVersionUID = -7443155251263210842L;
private String userID;
public ClientReque... | Java |
package anonymouschat.messages.clientrequests;
/**
* client sends an instance of this to server, when it leaves the system.
*
* How to define LEAVE?
*
* close the chat room frame.
*
* @author bh349
*
*/
public class UserLeaveRequest extends ClientRequest
{
/**
*
*/
... | Java |
package anonymouschat.utils;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import anonymouschat.messages.Message;
import anonymouschat.service.Server;
public class Print {
/**
* Only print debug messages if debugging is turned on
*/
private static final boolean PRINT_DEBUG_MESSAGE... | Java |
package anonymouschat.utils;
import java.security.SecureRandom;
/**
* Store a set of constant variables for anonymous chat.
*
* @author hb
*
*/
public class Constants {
public static final String SERVER_FOLDER = "ServerData";
public static final String CLIENT_FOLDER = "ClientData";
public stati... | Java |
package anonymouschat.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.ArrayList;
import java.util.LinkedList;
import anonymouschat.client.Client;
import anonymouschat.service.ServerEntry;
... | Java |
package anonymouschat.utils;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
... | Java |
package anonymouschat.utils;
import java.net.InetAddress;
import anonymouschat.service.ServerEntry;
public class ServerUtils {
public static void main(String[] args) throws Exception {
if (args.length > 0) { // a list of servers was provided
ListOfServers los = new ListOfServers();
for (int i ... | Java |
package anonymouschat.exceptions;
/**
* Thrown when a server fails to load a private identity from the file system
* @author Jason
*
*/
public class LoadPrivateIdentityException extends Exception
{
private static final long serialVersionUID = 4454394814759577841L;
private String description;
... | Java |
package anonymouschat.exceptions;
/**
* Thrown when a server fails to send a message to a published user.
*/
public class SendMessageToPublishedUserException extends Exception
{
private static final long serialVersionUID = -5968138542205496997L;
public SendMessageToPublishedUserException(String e... | Java |
package anonymouschat.exceptions;
/**
* Thrown when doing dec
*
* @author bh349
*
*/
public class DecryptionException extends Exception {
private static final long serialVersionUID = -2111531216279248848L;
public DecryptionException(String msg) {
super(msg);
}
}
| Java |
package anonymouschat.exceptions;
/**
* Thrown when one server cannot connect to another server
*/
public class ServerToServerConnectionException extends Exception {
public ServerToServerConnectionException(String string) {
super(string);
}
private static final long serialVersionUID = -431046295607... | Java |
package anonymouschat.exceptions;
/**
* Exception thrown when the tag of an object does not match
* @author jnfrye
*
*/
public class InvalidTagException extends Exception {
private static final long serialVersionUID = 8925808031880600791L;
public InvalidTagException(String message){
super(messag... | Java |
package anonymouschat.exceptions;
/**
* Thrown when a server fails to connect to a socket.
*
*/
public class ConnectionException extends Exception {
private static final long serialVersionUID = 5447179585567596957L;
public ConnectionException(String msg) {
super(msg);
}
}
| Java |
package anonymouschat.service;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.UnknownHostException;
import java.util.LinkedList;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.swing.JOptionPane;
import javax.swing.JPasswordFi... | Java |
package anonymouschat.service;
import java.util.concurrent.ConcurrentHashMap;
import javax.crypto.SecretKey;
import anonymouschat.utils.Print;
/**
* Upstream is the path of client towards publication server Downstream is the
* path of publication server towards client
*
* @author jnfrye
*
*/
... | Java |
package anonymouschat.service;
import java.io.Serializable;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import anonymouschat.utils.Consta... | Java |
package anonymouschat.service;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.security.KeyPair;
import ja... | Java |
package anonymouschat.service;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.net.Socket;
import java.net.UnknownHostException;
import anonymouschat.exceptions.ConnectionException;
import anonymouschat.messages.Messag... | Java |
package anonymouschat.service;
import java.io.IOException;
import java.io.Serializable;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.cr... | Java |
package anonymouschat.service;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.s... | Java |
package anonymouschat.client;
import java.io.Serializable;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import anonymouschat.utils.Print;
/**
* Contains all the information to be distributed to the servers, and other users that wish
*... | Java |
package anonymouschat.client.network;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.sec... | Java |
package anonymouschat.client.frames;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
impo... | Java |
package anonymouschat.client.frames;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
... | Java |
package anonymouschat.client.frames;
import java.io.IOException;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import anonymouschat.client.Identity;
import anonymouschat.utils.LocalFileOps;
/**
* Log Frame shows chat log with a specific user.
*
* @author ... | Java |
package anonymouschat.client;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* NickList obj stores nick name information. Serializable.
*
* @author hb
*
*/
public class NickNameList implements Serializable {
private static final long serialVersionUID = 1L;
... | Java |
package anonymouschat.client;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
import javax.crypto.SecretKey;
import javax.swing.JOptionPane;
im... | Java |
package anonymouschat.client;
import java.io.Serializable;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
import javax.crypto.SecretKey;
import anonymouschat.security.KeySa... | Java |
package anonymouschat.security;
import java.io.Serializable;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
* Stores a mapping of user names to salt. Salt is used when creating an AES key
* for password based authentication
* <br/><br/>
* When saved as a file, this class does n... | Java |
package anonymouschat.security;
import java.io.Serializable;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import javax.crypto.spec.IvParameterSpec;
import anonymouschat.utils.Print;
/**
* Holds random numbers used as salt in local file encryptions
* @author jnfrye
... | Java |
package anonymouschat.security;
import java.io.Serializable;
import javax.crypto.SecretKey;
import anonymouschat.exceptions.InvalidTagException;
import anonymouschat.security.integrity.MacTag;
/**
* Wrapper class of a serialized object and a MacTag of that object
* This is used to check the integrity o... | Java |
package anonymouschat.security;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.securit... | Java |
package anonymouschat.security;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.KeySpec;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
imp... | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.