FileDocCategorySizeDatePackage
UnsealPoint.javaAPI DocExample942Mon Feb 13 12:54:02 GMT 2006None

UnsealPoint

public class UnsealPoint extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

  
    FileInputStream fin = new FileInputStream("point.des");
    ObjectInputStream oin = new ObjectInputStream(fin);
      
    // Create a key.
    byte[] desKeyData = {(byte) 0x90, (byte) 0x67, (byte) 0x3E, (byte) 0xE6, 
                         (byte) 0x42, (byte) 0x15, (byte) 0x7A, (byte) 0xA3 };
    DESKeySpec desKeySpec = new DESKeySpec(desKeyData);
    SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
    SecretKey desKey = keyFactory.generateSecret(desKeySpec);
      
    SealedObject so = (SealedObject) oin.readObject();
      
    Point p = (Point) so.getObject(desKey);
    System.out.println(p);
    oin.close();