1 /** 2 * @license 3 * Copyright 2016 Google Inc. All rights reserved. 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.google.security.wycheproof; 18 19 import com.google.security.wycheproof.WycheproofRunner.Fast; 20 import com.google.security.wycheproof.WycheproofRunner.Provider; 21 import com.google.security.wycheproof.WycheproofRunner.ProviderType; 22 import org.junit.BeforeClass; 23 import org.junit.runner.RunWith; 24 import org.junit.runners.Suite.SuiteClasses; 25 import org.spongycastle.jce.provider.BouncyCastleProvider; 26 27 /** 28 * Spongy Castle is a Bouncy Castle clone with a few changes to make it work on Android. 29 * SpongyCastleTest excludes {@code @SlowTest} tests. 30 */ 31 @RunWith(WycheproofRunner.class) 32 @SuiteClasses({ 33 AesEaxTest.class, 34 AesGcmTest.class, 35 BasicTest.class, 36 CipherInputStreamTest.class, 37 CipherOutputStreamTest.class, 38 DhTest.class, 39 DhiesTest.class, 40 DsaTest.class, 41 EcKeyTest.class, 42 EcdhTest.class, 43 EcdsaTest.class, 44 EciesTest.class, 45 RsaEncryptionTest.class, 46 RsaKeyTest.class, 47 RsaSignatureTest.class, 48 }) 49 @Provider(ProviderType.SPONGY_CASTLE) 50 @Fast 51 public final class SpongyCastleTest { 52 @BeforeClass setUp()53 public static void setUp() throws Exception { 54 TestUtil.installOnlyThisProvider(new BouncyCastleProvider()); 55 } 56 } 57