text
stringlengths
3
1.18M
class MyArrayList{ private int[] MyArray; private int size; public MyArrayList(int value, int seed, int inc){ MyArray = new int [value]; size = value; for (int i = 0; i < size; i++){ MyArray[i]=seed; seed += inc; } } public void PrintElement(){ for (int i = 0; i < size; i++){ System.out.println(MyArray...
public class MyArray { }
class MyArrayList{ private int[] MyArray; private int size; public MyArrayList(int value, int seed, int inc){ MyArray = new int [value]; size = value; for (int i = 0; i < size; i++){ MyArray[i]=seed; seed += inc; } } public void PrintElement(){ for (int i = 0; i < size; i++){ System.out.println(MyArray...
import javax.swing.*; public class OddOrEven { public static void main(String[]args){ String num = ""; num = JOptionPane.showInputDialog(null, "Enter Integer"); int a = Integer.parseInt(num); if(a % 2==0){ JOptionPane.showMessageDialog (null,"Even"); } else { JOptionPane.showMessageDialog (null...
import javax.swing.JOptionPane; public class Calculator { public static void main(String[] args) { String num = ""; num1 = JOptionPane.showInputDialog(null, "Please enter a value: "); if (num = null ) }
import javax.swing.*; public class Userinput { public static void main(String[] args) { String num = ""; num = JOptionPane.showInputDialog( null, "Please enter your name: "); if(num == null) { JOptionPane.showMessageDialog(null,"no name"); } else{ } JOptionPane.showMessageDialo...
import javax.swing.*; public class HellowWorld { public static void main(String[]args){ String num = ""; num = JOptionPane.showInputDialog(null, "Enter Integer"); int a = Integer.parseInt(num); if(a % 2==0){ JOptionPane.showMessageDialog (null,"Even"); } else { JOptionPane.showMessageDialog (nu...
class LinkedListNode{ public int data; public LinkedListNode link; } public class JavaApplication1 { public static void main(String[] args){ LinkedListNode head, newNode; LinkedListNode current; LinkedListNode pointer; head = new LinkedListNode(); newNode = new LinkedListNode()...
class Queue{ private int maxSize; private char[] queueArray; private int Front; private int Rear; private int Counter; public Queue(int max) { maxSize = max; queueArray = new char[maxSize]; Front = 0; Rear = maxSize - 1; Counter = 0; } ...
package src; public class JavaApp1 { }
class LinkedListNode{ public int data; public LinkedListNode link; } public class Linked { public static void main(String[] args){ LinkedListNode head, newNode; LinkedListNode current; LinkedListNode pointer; head = new LinkedListNode(); newNode = new LinkedListNode(); newN...
public class Calculator{ int x; int y; int z; public Calculator(int num1, int num2){ x= num1; y= num2; } public int addNumbers(){ z= x+y; return z; } public int subtractNumbers(){ z= x-y; return z; } public int multiplyNumbers(){ z= x*y; r...
/* * Copyright 2013 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 agreed to in...
/* * Copyright 2013 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 agreed to in...
/* * Copyright (C) 2013 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...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in...
/* * Copyright 2012 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 agreed to in...
/* * Copyright 2012 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 agreed to in...
/* * Copyright 2012 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 agreed to in...
/* * Copyright 2012 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 agreed to in...
/** Automatically generated file. DO NOT MODIFY */ package com.google.android.gcm; public final class BuildConfig { public final static boolean DEBUG = true; }
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in...
/* * Copyright 2012 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 agreed to in...
/* * Copyright 2012 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 agreed to in...
/* * Copyright 2012 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 agreed to in...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
/* * Copyright 2012 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 agreed to in w...
public class FirstActivity { public static void main(String[] args) { int x=10; int y=x%2; if ( y==0 ){ System.out.println (x + " is even");} else{ System.out.println(x + " is odd"); } }
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package javaapp1; class MyArrayList { private int[] MyArray; private int size; public MyArrayList(int value, int seed, int inc){ MyArray = new int[value]; ...
class MyArrayList { private int[] MyArray; private int size; public MyArrayList(int value, int seed, int inc){ MyArray = new int[value]; size = value; for (int i = 0; i < size; i++) { MyArray[i] = seed; seed += inc; } } public void PrintList(){ for (int i = 0; i < size; ...
package jjava.ch01; import java.awt.Frame; import java.awt.Graphics; public class jjava extends Frame { public jjava (String title) { super(title); setSize(300,200); setVisible(true); } public void paint(Graphics g) { g.drawString("Welcome to JAVA!", 50, 50); } public static ...
public class homework0 { /** * @param args */ public static void main(String[] args) { int x =0; long fac = 1; for(x=1; x<=10; x++) { fac=fac*x; System.out.println(x+"! = " +fac); } } }
package javaclass; class today { int num; float day; String string; public today(int i) { System.out.println(i); System.out.println("-------------------------------"); } public today(int i, float j) { System.out.println(i); System.out.println(j); Sy...
package conector; import java.io.BufferedReader; import java.io.FileReader; import java.util.ArrayList; public class AdminConexion { private BufferedReader acceso; private ArrayList<String> datos; private Conector conexion; private String linea; public AdminConexion(String archivo) { try { acceso = new B...
package nucleo; public class Servicio implements AccesoaDatos { private int idServicio; private String nombreServicio; private int valorServicio; private String descripcion; public int getIdServicio() { return idServicio; } public void setIdServicio(int idServicio) { this.idServicio = idServicio; } ...
package nucleo; public class Huesped implements AccesoaDatos { private int idHuesped; private String nombreHuesped; private int edad; private String direccion; private int telefono; public int getIdHuesped() { return idHuesped; } public void setIdHuesped(int idHuesped) { this.idHuesped = idHuesped...
package nucleo; public class HabitacionReservada implements AccesoaDatos { private Reservacion reservacion; private Habitacion habitacion; public Reservacion getReservacion() { return reservacion; } public void setReservacion(Reservacion reservacion) { this.reservacion = reservacion; } public Habita...
package nucleo; public class HabitacionHuesped implements AccesoaDatos { private Huesped huesped; private HabitacionOcupada habitacionOcupada; public Huesped getHuesped() { return huesped; } public void setHuesped(Huesped huesped) { this.huesped = huesped; } public HabitacionOcupada getHabitacionOcu...
package nucleo; public class Habitacion implements AccesoaDatos { private int numHabitacion; private int precioNoche; private String tipoHabitacion; private boolean estadoReserva; private final String SIMPLE = "S"; private final String DOBLE = "D"; private final String TRIPLE = "T"; private Reservacion...
package nucleo; import java.text.SimpleDateFormat; import java.util.Date; public class Consumo implements AccesoaDatos { private int cantidad; private Date fechaConsumo; private Servicio servicio; private HabitacionOcupada habitacionOcupada; private SimpleDateFormat formato = new SimpleDateFormat("yyyy-mm-...
package nucleo; import java.text.SimpleDateFormat; import java.util.Date; public class Recaudo implements AccesoaDatos { private int idRecaudo; private int valorRecaudo; private String descripcion; private Date fechaPago; private HabitacionOcupada habitacionOcupada; private SimpleDateFormat formato = new...
package nucleo; public class Reservacion implements AccesoaDatos { private int idReservacion; private String estadoReservacion; public static final String CONFIRMADA = "CO"; public static final String RADICADA = "RA"; public static final String CANCELADA = "CA"; private Cliente cliente; private Estadia ...
package nucleo; public interface AccesoaDatos { /** * Retorna una cadena SQL que realiza la insercion de datos en la BD * @return cadena */ public abstract String guardarDatos(); /** * Retorna una cadena SQL que realiza la modificacion de datos en la BD * @return */ public abstract String modificarDa...
package nucleo; import java.text.SimpleDateFormat; import java.util.Date; public class Estadia implements AccesoaDatos { private int idEstadia; private Date fechaInicio; private int nochesEstadia; private SimpleDateFormat formato = new SimpleDateFormat("yyyy-mm-dd"); public int getIdEstadia() { return id...
package nucleo; public class Cliente implements AccesoaDatos { private int idCliente; private String nombreCliente; public int getIdCliente() { return idCliente; } public void setIdCliente(int idCliente) { this.idCliente = idCliente; } public String getNombreCliente() { return nombreCliente; } ...
package nucleo; public class HabitacionOcupada implements AccesoaDatos { private int consecutivo; private int totalConsumo; private Habitacion habitacion; private Estadia estadia; public int getConsecutivo() { return consecutivo; } public void setConsecutivo(int consecutivo) { this.consecutivo = cons...
/** * */ package gui; import java.sql.ResultSet; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; import nucleo.Cliente; import nucleo.Estadia; import nucleo.Habitacion; import nucleo.Reservacion; import conector.AdminConexion; import conector.Conector; /** ...
/** * */ package gui; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.border.TitledBorder; /** * @author Jhamir * */ public class PanelOpciones extends JPanel implem...
/** * */ package gui; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.border.TitledBorder; import javax.swing.table.DefaultTableModel; /** * @author Jhamir * */ public class TablaC...
/** * */ package gui; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.ResultSet; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.border.TitledBo...
/** * */ package gui; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.border.TitledBorder; public class PanelServicios2 extends JPanel implements ActionListener{ private VentanaAdministrador ventana...
/** * */ package gui; import java.util.Date; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.border.TitledBorder; import com.toedter.calendar.JCalendar; /** * @author Jhamir * */ public class PanelCancelar extends JPanel{ private J...
package autenticacion; public class UsuarioNuevo extends Usuario { @Override public String consultarUsuario() { String cadena = "select * from usuario where(k_idusuario=" + this.getIdusuario() +");"; return cadena; } @Override public String modificarRegistro() { String cadena = "insert into usuario value...
package autenticacion; public class UsuarioExistente extends Usuario{ @Override public String consultarUsuario() { String cadena = "select k_idusuario, k_passusuario, o_descripcion from usuario, tipousuario where(k_idusuario='" + this.getIdusuario() + "' and k_tipousuario=k_idtipousuario);"; return caden...
package projekt.cpoo; import interpolation.BaseInterpolation; import interpolation.BicubicInterpolation; import interpolation.BilinearInterpolation; import interpolation.NearestNeighbourInterpolation; import interpolation.SeamCarvingInterpolation; import java.awt.BorderLayout; import java.awt.EventQueue; im...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package projekt.cpoo; import java.io.File; import javax.swing.filechooser.FileFilter; /** * * Filtr rozszerzenia nazwy pliku. */ public class ExtensionFileFilter extends FileFilter { String descri...
package interpolation; import java.awt.*; import java.awt.image.BufferedImage; import Jama.Matrix; /** * Created with IntelliJ IDEA. * User: Maciej Szumielewicz * Date: 12/12/12 * Time: 12:29 PM * To change this template use File | Settings | File Templates. */ public class BicubicInterpolation extends BaseInte...
package interpolation; import java.awt.*; import java.awt.image.BufferedImage; /** * Created with IntelliJ IDEA. * User: Maciej Szumielewicz * Date: 12/12/12 * Time: 12:04 PM * To change this template use File | Settings | File Templates. * Algorithm description: http://www.algorytm.org/przetwarzanie-obrazow/zm...
package interpolation; /** * Podstawowe parametry obrazu. * */ public class ImageParams { public String fileName; public int width, height; }
package interpolation; import org.apache.log4j.Logger; import org.junit.BeforeClass; import org.junit.Test; /** * Created with IntelliJ IDEA. * User: root * Date: 1/19/13 * Time: 6:42 PM * To change this template use File | Settings | File Templates. */ public class BicubicInterpolationTest { static Bicubi...
package interpolation; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; // przydatne informacje // TODO http://astrophysics.fic.uni.lodz.pl/medtech/dodatki/metpo.html // TODO http://en.wikipedia.org/wiki/Hqx // TODO...
package interpolation; import java.awt.Color; import java.awt.Image; import java.awt.image.BufferedImage; /** * Interpolacja dwuliniowa * http://www.algorytm.org/przetwarzanie-obrazow/zmiana-wielkosci-obrazu-interpolacja-dwuliniowa.html */ public class BilinearInterpolation extends BaseInterpolation { ...
class myArrayList { private int[] myArray; private int size; public myArrayList( int value, int seed, int inc ) { myArray = new int [value]; size = value; for ( int i = 0 ; i < size ; i++ ) { myArray[i] = seed; ...
class LinkedListNode { public int data; public LinkedListNode link; } public class JavaApplication1 { public static void main(String[] args) { /* exercise head -> 45 -> 65 -> 50 -> 34 -> 76 exercise 1: insert 15 between 34 and 76 ...
import javax.swing.*; public class OddEven { public static void main(String[] args) { int number; number = Integer.parseInt(JOptionPane.showInputDialog( null, "Please enter a number: " )); OddNumber ( number ); EvenNumber ( number ); } ...
import javax.swing.*; public class HelloWorld { public static void main(String[] args) { JOptionPane.showMessageDialog( null, "Hello World!" ); } }
import javax.swing.*; public class UserInput { public static void main(String[] args) { String num = ""; num = JOptionPane.showInputDialog(null, "Please enter your name:" ); JOptionPane.showMessageDialog(null, "Hi " + num + "!"); } }
import javax.swing.*; public class HelloWorld { public static void main(String[] args) { int number; number = Integer.parseInt(JOptionPane.showInputDialog( null, "Please enter a number: " )); if ( number % 2 == 1 ) { JOptionPane.showMessageDialo...
import java.util.Random; class sortArray { private int[] myArray; public sortArray() { System.out.println("Default Order:"); Random digit = new Random(); myArray = new int [10]; for ( int counter = 0 ; counter < 10 ; counter++ ) { myArray[counter] = 1 + digit.nextInt(10); } printEleme...
class Calclib { int x; int y; int z; public Calclib(int num1, int num2) { x= num1; y=num2; } public int addNumber() { z = x+y; return z; } public int subtractNumbers() { ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package jbmicalc; import com.sun.org.apache.bcel.internal.generic.AALOAD; import java.text.DecimalFormat; import java.text.NumberFormat; import javax.swing.JOptionPane; import javax.swing.text.NumberFormatter; /** * ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * JBMICalcFrame.java * * Created on 20.03.2009, 19:41:56 */ package jbmicalc; import java.util.ResourceBundle; import javax.swing.SpinnerNumberModel; /** * * @author uli */ public class JBMICalcFrame extend...
package jbmicalc; /* * JNumberSpinner.java * A spinner with easier number access * Created on 28.02.2009, 19:22:18 */ import javax.swing.JSpinner; import javax.swing.SpinnerNumberModel; /** * * @author uli */ public class JNumberSpinner extends JSpinner { /** Creates new form BeanForm */ public JNumberSpinn...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package jcrypter; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.security.Key; import java.security.KeyPair; import java.security.PrivateKey; import java.se...
package jcrypter.utils.keyfinder; import java.io.File; import java.io.FileInputStream; import java.io.FilenameFilter; import java.io.IOException; import java.io.InputStream; import java.util.*; import org.bouncycastle.openpgp.*; /** * * @author uli */ public class PGPKeyReader implements KeyReader { public P...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package jcrypter; import gnu.crypto.util.Base64; import java.io.UnsupportedEncodingException; import java.security.GeneralSecurityException; import java.security.Key; import java.security.MessageDigest; import javax.cr...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package jcrypter; import java.io.*; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.SecureRandom; import java.util.List; import org.junit.After; import org.junit.AfterClass; im...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package jcrypter; import gnu.crypto.cipher.CipherFactory; import gnu.crypto.cipher.IBlockCipher; import gnu.crypto.hash.HashFactory; import gnu.crypto.hash.IMessageDigest; import gnu.crypto.mode.IMode; import gnu.crypt...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package jcrypter; import java.security.KeyPair; import java.sql.SQLException; import java.util.List; /** * * @author uli */ public interface KeyStorageProvider { public void setup() throws SQLException; pub...
/* * DHServerFrame.java * * Created on 27. September 2008, 15:04 */ package jcrypter.dh; import javax.swing.SpinnerNumberModel; /** * * @author uli */ public class DHServerFrame extends javax.swing.JFrame { /** Creates new form DHServerFrame */ public DHServerFrame() { initComponents(); ...
BlockCipher engine = new TwofishEngine(); BufferedBlockCipher cipher = new PaddedBufferedBlockCipher(new CBCBlockCipher(engine)); //Get data and encrypt byte[] passwordBytes = new String(passwordField.getPassword()).getBytes(); byte[] input; //Base64-decode the ciphertext if(decryptCheckbox.isSelected()) {input = Base6...