Posts

Showing posts from May, 2012

encyption-decryption using DES

 Example of encyption-decryption using DES
 ----------------------------------------------------------
package com.example.des;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.CipherOutputStream;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;

public class CipherExample {

    public static void main(String[] args) {
        try {
            String key = "y1$ab??x";            // your key , needs to be at least 8 characters for DES


            FileInputStream fis = new FileInputStream("OriginalFile.txt");
            FileOutputStream fos = new FileOutputStream("encryptedFile.txt");
            System.out.println("Going to encrpyt this file using DES.......");
            encrypt(key, fis, fos);

            FileInputStream f…

User Service RPC call failed: 500 The call failed on the server

GWT: User Service RPC call failed: 500 The call failed on the server
Solution: If you are using objectify then make sure that you have added it's jar file (objectify-2.2.1.jar) into WEB-INF/lib as well as you have put this file in classpath (using java build path in case of eclipse)

Also don't forget to include: <inherits name="com.googlecode.objectify.Objectify" /> in your project-name.gwt.xml file.



Fishbone: A GWT and Google App Engine Blog: An Objectify example to store data in the Google A...

Fishbone: A GWT and Google App Engine Blog: An Objectify example to store data in the Google A...: If you're like me, then you've searched for a complete working example using Objectify with Google App Engine to persist data and utilize th...