Advertisement
Guest User

BouncyCastleProvider

a guest
Apr 1st, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. package com.slock.slockapp;
  2.  
  3. import junit.framework.TestCase;
  4.  
  5. import java.security.Security;
  6.  
  7. import javax.crypto.Cipher;
  8.  
  9. public class CryptographyTest extends TestCase {
  10.  
  11.     public void setUp() throws Exception {
  12.         super.setUp();
  13.     }
  14.  
  15.     public void testEncrypt() throws Exception {
  16.         Security.insertProviderAt(new org.spongycastle.jce.provider.BouncyCastleProvider(), 1);
  17.         Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding", "BC");
  18.         assert(true);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement