Guest User

Untitled

a guest
Jul 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. Cipher cipher = Cipher.getInstance("DES");
  2. cipher.init(Cipher.ENCRYPT_MODE, certificate);
  3. byte[] bytes = cipher.doFinal(text.getBytes());
  4.  
  5. Provider sun = new sun.security.provider.Sun();
  6. Security.addProvider(sun);
Add Comment
Please, Sign In to add comment