FileDocCategorySizeDatePackage
SendXYZ.javaAPI DocExample2044Sun Oct 25 18:13:36 GMT 1998None

SendXYZ

public class SendXYZ extends Object

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

		try {
			Security.addProvider(new XYZProvider());
			FileOutputStream fos = new FileOutputStream("test.xyz");
			MessageDigest md = MessageDigest.getInstance("XYZ");
			ObjectOutputStream oos = new ObjectOutputStream(fos);
			String data = "This have I thought good to deliver thee, " +
				"that thou mightst not lose the dues of rejoicing " +
				"by being ignorant of what greatness is promised thee.";
			byte buf[] = data.getBytes();
			md.update(buf);
			oos.writeObject(data);
			oos.writeObject(buf = md.digest("Sleep no more".getBytes()));
		} catch (Exception e) {
			System.out.println(e);
		}