//package IM;

import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
import java.security.Signature;
import java.security.MessageDigest;
import java.util.HashMap;

class GenerateBanned {
    public static void main(String args[]) {
        try {
            String array[] = new String[3];



            array[0] = "Tibet";
            array[1] = "Tiananmen";
            array[2] = "Taiwan";
            MessageDigest md = MessageDigest.getInstance("SHA1");


            //HashMap bannedWordsHash = new HashMap();
            byte[][] bannedWordsHash = new byte[array.length][];
            for (int i = 0; i < array.length; i++){
                 bannedWordsHash[i] = md.digest(array[i].getBytes());
                //System.out.println(md.digest(array[i].getBytes()).length);

            }
            FileOutputStream fos = new FileOutputStream("banned");
            ObjectOutputStream objout = new ObjectOutputStream(fos);
            objout.writeObject(bannedWordsHash);
            objout.close();
            fos.close();
        } catch (Exception e) {
            System.out.print("Error\n");
        }
    }
}
