// Path: src/main/java/com/github/aelstad/keccakj/fips202/Shake128.java
// public final class Shake128 extends KeccakSponge {
// 	private final static byte DOMAIN_PADDING = 0xf;
// 	private final static int DOMMAIN_PADDING_LENGTH = 4;
// 	
// 	public Shake128() {
// 		super(256, DOMAIN_PADDING, DOMMAIN_PADDING_LENGTH);
// 	}
// 	
// 	
// 	
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/spi/Shake128Key.java
// public class Shake128Key extends RawKey {
// 
// 	@Override
// 	public String getAlgorithm() {		
// 		return Constants.SHAKE128_STREAM_CIPHER;
// 	}
// 
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/spi/Shake128StreamCipher.java
// public final class Shake128StreamCipher extends AbstractSpongeStreamCipher {
// 	private Shake128 sponge;
// 
// 	@Override
// 	KeccakSponge getSponge() {
// 		if(sponge == null) {
// 			sponge = new Shake128();
// 		}
// 		return sponge;
// 	}
// 
// }


import java.io.ByteArrayOutputStream;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.SecureRandom;
import java.util.Arrays;
import java.util.Random;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import org.junit.Assert;
import org.junit.Test;
import com.github.aelstad.keccakj.fips202.Shake128;
import com.github.aelstad.keccakj.spi.Shake128Key;
import com.github.aelstad.keccakj.spi.Shake128StreamCipher;
/*
 * 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.fips202;





/**
 * Demonstrates stream encryption/decryption
 */
public class TestStreamEncryption {

	@Test
	public void testIt() throws IOException, NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException {
// Path: src/main/java/com/github/aelstad/keccakj/fips202/Shake128.java
// public final class Shake128 extends KeccakSponge {
// 	private final static byte DOMAIN_PADDING = 0xf;
// 	private final static int DOMMAIN_PADDING_LENGTH = 4;
// 	
// 	public Shake128() {
// 		super(256, DOMAIN_PADDING, DOMMAIN_PADDING_LENGTH);
// 	}
// 	
// 	
// 	
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/spi/Shake128Key.java
// public class Shake128Key extends RawKey {
// 
// 	@Override
// 	public String getAlgorithm() {		
// 		return Constants.SHAKE128_STREAM_CIPHER;
// 	}
// 
// }
// 
// Path: src/main/java/com/github/aelstad/keccakj/spi/Shake128StreamCipher.java
// public final class Shake128StreamCipher extends AbstractSpongeStreamCipher {
// 	private Shake128 sponge;
// 
// 	@Override
// 	KeccakSponge getSponge() {
// 		if(sponge == null) {
// 			sponge = new Shake128();
// 		}
// 		return sponge;
// 	}
// 
// }


// Path: src/test/java/com/github/aelstad/keccakj/fips202/TestStreamEncryption.java
import java.io.ByteArrayOutputStream;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.SecureRandom;
import java.util.Arrays;
import java.util.Random;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import org.junit.Assert;
import org.junit.Test;
import com.github.aelstad.keccakj.fips202.Shake128;
import com.github.aelstad.keccakj.spi.Shake128Key;
import com.github.aelstad.keccakj.spi.Shake128StreamCipher;

/*
 * 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.fips202;





/**
 * Demonstrates stream encryption/decryption
 */
public class TestStreamEncryption {

	@Test
	public void testIt() throws IOException, NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException {
		Shake128 shake128 = new Shake128();