Code example for DESKeySpec

0
    public ContactStorage(Context context)
    { 
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
        try 
        { 
            DESKeySpec keySpec = new DESKeySpec(KEY_SECRET.getBytes("UTF8"));
            SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
            key = keyFactory.generateSecret(keySpec);
        } catch (InvalidKeyException e)
        { 
            // TODO Auto-generated catch block 
            e.printStackTrace();
        } catch (UnsupportedEncodingException e)
        { 
            // TODO Auto-generated catch block 
            e.printStackTrace();
        } catch (NoSuchAlgorithmException e)
        { 
            // TODO Auto-generated catch block 
            e.printStackTrace();
        } catch (InvalidKeySpecException e)