FileDocCategorySizeDatePackage
StoreKey.javaAPI DocExample494Sat Jan 13 13:55:04 GMT 2001javasec.samples.ch10

StoreKey

public class StoreKey extends Object

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

        KeyStoreHandler ksh = new KeyStoreHandler(args[1].toCharArray());
        KeyStore ks = ksh.getKeyStore();

        KeyGenerator kg = KeyGenerator.getInstance("DES");
        SecretKey sk = kg.generateKey();
        ks.setKeyEntry(args[0], sk, args[2].toCharArray(), null);
        ksh.store();