// Path: src/main/java/com/github/aelstad/keccakj/cipher/CipherProviderFactory.java
// public interface CipherProviderFactory {
// 	public CipherInterface getInstance(String transformation) throws NoSuchAlgorithmException, NoSuchPaddingException;
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/fips202/SHA3_224.java
// public final class SHA3_224 extends AbstractKeccakMessageDigest {
// 	private final static byte DOMAIN_PADDING = 2;
// 	private final static int DOMMAIN_PADDING_LENGTH = 2;
// 
// 	public SHA3_224() {
// 		super("SHA3-224", 224*2, 224/8,  DOMAIN_PADDING, DOMMAIN_PADDING_LENGTH);
// 	}
// 
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/fips202/SHA3_256.java
// public final class SHA3_256 extends AbstractKeccakMessageDigest {
// 	private final static byte DOMAIN_PADDING = 2;
// 	private final static int DOMMAIN_PADDING_LENGTH = 2;
// 
// 	public SHA3_256() {
// 		super("SHA3-256", 2*256, 256/8, DOMAIN_PADDING, DOMMAIN_PADDING_LENGTH);
// 	}
// 
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/fips202/SHA3_384.java
// public final class SHA3_384 extends AbstractKeccakMessageDigest {
// 	private final static byte DOMAIN_PADDING = 2;
// 	private final static int DOMMAIN_PADDING_LENGTH = 2;
// 
// 	public SHA3_384() {
// 		super("SHA3-384", 2*384, 384/8, DOMAIN_PADDING, DOMMAIN_PADDING_LENGTH);
// 	}
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/fips202/SHA3_512.java
// public final class SHA3_512 extends AbstractKeccakMessageDigest {
// 
// 	private final static byte DOMAIN_PADDING = 2;
// 	private final static int DOMMAIN_PADDING_LENGTH = 2;
// 
// 	public SHA3_512() {
// 		super("SHA3-512", 2*512, 512/8, DOMAIN_PADDING, DOMMAIN_PADDING_LENGTH);
// 	}
// 
// }


import java.security.MessageDigest;
import java.security.SecureRandom;
import java.security.Security;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import com.github.aelstad.keccakj.cipher.CipherProviderFactory;
import com.github.aelstad.keccakj.fips202.SHA3_224;
import com.github.aelstad.keccakj.fips202.SHA3_256;
import com.github.aelstad.keccakj.fips202.SHA3_384;
import com.github.aelstad.keccakj.fips202.SHA3_512;
/*
 * Copyright 2014 Amund Elstad. 
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.aelstad.keccakj.provider;




public class TestKeccakjProvider {

	@BeforeClass
	public static void beforeClass() {
		Security.addProvider(new KeccakjProvider());
	}
	
	@Test
	public void testSha3_224() throws Exception {
		Assert.assertTrue(Constants.SHA3_224.equals("SHA3-224"));
		Assert.assertTrue(MessageDigest.getInstance(Constants.SHA3_224, Constants.PROVIDER) instanceof SHA3_224);
	}
	
	@Test
	public void testSha3_256() throws Exception {
		Assert.assertTrue(Constants.SHA3_256.equals("SHA3-256"));
		Assert.assertTrue(MessageDigest.getInstance(Constants.SHA3_256, Constants.PROVIDER) instanceof SHA3_256);
	}
	
	@Test
	public void testSha3_384() throws Exception {
// Path: src/main/java/com/github/aelstad/keccakj/cipher/CipherProviderFactory.java
// public interface CipherProviderFactory {
// 	public CipherInterface getInstance(String transformation) throws NoSuchAlgorithmException, NoSuchPaddingException;
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/fips202/SHA3_224.java
// public final class SHA3_224 extends AbstractKeccakMessageDigest {
// 	private final static byte DOMAIN_PADDING = 2;
// 	private final static int DOMMAIN_PADDING_LENGTH = 2;
// 
// 	public SHA3_224() {
// 		super("SHA3-224", 224*2, 224/8,  DOMAIN_PADDING, DOMMAIN_PADDING_LENGTH);
// 	}
// 
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/fips202/SHA3_256.java
// public final class SHA3_256 extends AbstractKeccakMessageDigest {
// 	private final static byte DOMAIN_PADDING = 2;
// 	private final static int DOMMAIN_PADDING_LENGTH = 2;
// 
// 	public SHA3_256() {
// 		super("SHA3-256", 2*256, 256/8, DOMAIN_PADDING, DOMMAIN_PADDING_LENGTH);
// 	}
// 
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/fips202/SHA3_384.java
// public final class SHA3_384 extends AbstractKeccakMessageDigest {
// 	private final static byte DOMAIN_PADDING = 2;
// 	private final static int DOMMAIN_PADDING_LENGTH = 2;
// 
// 	public SHA3_384() {
// 		super("SHA3-384", 2*384, 384/8, DOMAIN_PADDING, DOMMAIN_PADDING_LENGTH);
// 	}
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/fips202/SHA3_512.java
// public final class SHA3_512 extends AbstractKeccakMessageDigest {
// 
// 	private final static byte DOMAIN_PADDING = 2;
// 	private final static int DOMMAIN_PADDING_LENGTH = 2;
// 
// 	public SHA3_512() {
// 		super("SHA3-512", 2*512, 512/8, DOMAIN_PADDING, DOMMAIN_PADDING_LENGTH);
// 	}
// 
// }


// Path: src/test/java/com/github/aelstad/keccakj/provider/TestKeccakjProvider.java
import java.security.MessageDigest;
import java.security.SecureRandom;
import java.security.Security;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import com.github.aelstad.keccakj.cipher.CipherProviderFactory;
import com.github.aelstad.keccakj.fips202.SHA3_224;
import com.github.aelstad.keccakj.fips202.SHA3_256;
import com.github.aelstad.keccakj.fips202.SHA3_384;
import com.github.aelstad.keccakj.fips202.SHA3_512;

/*
 * Copyright 2014 Amund Elstad. 
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.aelstad.keccakj.provider;




public class TestKeccakjProvider {

	@BeforeClass
	public static void beforeClass() {
		Security.addProvider(new KeccakjProvider());
	}
	
	@Test
	public void testSha3_224() throws Exception {
		Assert.assertTrue(Constants.SHA3_224.equals("SHA3-224"));
		Assert.assertTrue(MessageDigest.getInstance(Constants.SHA3_224, Constants.PROVIDER) instanceof SHA3_224);
	}
	
	@Test
	public void testSha3_256() throws Exception {
		Assert.assertTrue(Constants.SHA3_256.equals("SHA3-256"));
		Assert.assertTrue(MessageDigest.getInstance(Constants.SHA3_256, Constants.PROVIDER) instanceof SHA3_256);
	}
	
	@Test
	public void testSha3_384() throws Exception {
		Assert.assertTrue(Constants.SHA3_384.equals("SHA3-384"));