// Path: cryptocard/src/main/java/com/indarsoft/cryptocard/symmetrickey/DesKeyException.java
// public class DesKeyException extends Exception {
// 
// 	/**
// 	 * 
// 	 */
// 	private static final long serialVersionUID = -8029564933566258445L;
// 	private String msg ;
// 	
// 	public DesKeyException (String msg ) {
// 		super(msg);
// 		this.msg = msg ;
// 	}
// 
// 	public DesKeyException() {
// 
// 		super("Unhandled KeyException !!") ;
// 	}
// 	
// 	public String getMessage(){
// 		return msg ;
// 	}
// }
// 
// Path: cryptocard/src/main/java/com/indarsoft/cryptocard/symmetrickey/Pvk.java
// public class Pvk extends DesKey {
// 
// 	private int pvki ;
// 	/**
// 	 * PVK constructor
// 	 * @param aKey	DES key double length.
// 	 * @param pvki	pvki
// 	 * @throws DesKeyException if a exception arrives
// 	 */
// 	public Pvk (String aKey ,  int pvki  ) throws DesKeyException  {
// 		
// 		 super(aKey );
// 		 if ( ! validatePvki ( pvki ) ) throw new DesKeyException("Wrong Key - pvki must be Decimal between 1 and six !!") ;
// 		 /*
// 		  * Do not enforce this, because PVK is also used for IBM3264offset method
// 		  */
// 		 //if ( aKey.length() != 32 )  	throw new DesKeyException("Wrong Key - DOUBLE deskey Must be 32 long Hexadecimal data!!");
// 		 this.pvki = pvki ;
// 	}
// 	/**
// 	 * PVK constructor with default pvki = 1.
// 	 * @param aKey	DES key double length
// 	 * @throws DesKeyException if a exception arrives
// 	 */
// 	public Pvk (String aKey  ) throws DesKeyException  {
// 		
// 		 this (aKey, 1 );
// 	}
// 	
// 	public int getPvki () {
// 		return this.pvki ;				
// 	}
// 	
// 	private static Boolean validatePvki ( int pvki ){
// 		
// 		if ( pvki < 1 || pvki > 6 ){
// 			return false ;	
// 		}
// 		return true ;
// 	}		
// 	
// }


import static org.junit.Assert.*;
import org.junit.Test;
import com.indarsoft.cryptocard.symmetrickey.DesKeyException;
import com.indarsoft.cryptocard.symmetrickey.Pvk;

package com.indarsoft.cryptocard.symmetrickey;




public class PvkTest {

	public String simpleKeyStr = "0123456789ABCDEF" ;
	public String doubleKeyStr = "F1FD8AC2EFCE3BC8F1FD8AC2EFCE3BC8" ;
	public String simpleKeyCheckValue = "D5D44F";
	public String doubleKeyCheckValue = "13F5CC";
	
	@Test
	public void testPvkCheckValueDouble() {

// Path: cryptocard/src/main/java/com/indarsoft/cryptocard/symmetrickey/DesKeyException.java
// public class DesKeyException extends Exception {
// 
// 	/**
// 	 * 
// 	 */
// 	private static final long serialVersionUID = -8029564933566258445L;
// 	private String msg ;
// 	
// 	public DesKeyException (String msg ) {
// 		super(msg);
// 		this.msg = msg ;
// 	}
// 
// 	public DesKeyException() {
// 
// 		super("Unhandled KeyException !!") ;
// 	}
// 	
// 	public String getMessage(){
// 		return msg ;
// 	}
// }
// 
// Path: cryptocard/src/main/java/com/indarsoft/cryptocard/symmetrickey/Pvk.java
// public class Pvk extends DesKey {
// 
// 	private int pvki ;
// 	/**
// 	 * PVK constructor
// 	 * @param aKey	DES key double length.
// 	 * @param pvki	pvki
// 	 * @throws DesKeyException if a exception arrives
// 	 */
// 	public Pvk (String aKey ,  int pvki  ) throws DesKeyException  {
// 		
// 		 super(aKey );
// 		 if ( ! validatePvki ( pvki ) ) throw new DesKeyException("Wrong Key - pvki must be Decimal between 1 and six !!") ;
// 		 /*
// 		  * Do not enforce this, because PVK is also used for IBM3264offset method
// 		  */
// 		 //if ( aKey.length() != 32 )  	throw new DesKeyException("Wrong Key - DOUBLE deskey Must be 32 long Hexadecimal data!!");
// 		 this.pvki = pvki ;
// 	}
// 	/**
// 	 * PVK constructor with default pvki = 1.
// 	 * @param aKey	DES key double length
// 	 * @throws DesKeyException if a exception arrives
// 	 */
// 	public Pvk (String aKey  ) throws DesKeyException  {
// 		
// 		 this (aKey, 1 );
// 	}
// 	
// 	public int getPvki () {
// 		return this.pvki ;				
// 	}
// 	
// 	private static Boolean validatePvki ( int pvki ){
// 		
// 		if ( pvki < 1 || pvki > 6 ){
// 			return false ;	
// 		}
// 		return true ;
// 	}		
// 	
// }


// Path: cryptocard/src/test/java/com/indarsoft/cryptocard/symmetrickey/PvkTest.java
import static org.junit.Assert.*;
import org.junit.Test;
import com.indarsoft.cryptocard.symmetrickey.DesKeyException;
import com.indarsoft.cryptocard.symmetrickey.Pvk;

package com.indarsoft.cryptocard.symmetrickey;




public class PvkTest {

	public String simpleKeyStr = "0123456789ABCDEF" ;
	public String doubleKeyStr = "F1FD8AC2EFCE3BC8F1FD8AC2EFCE3BC8" ;
	public String simpleKeyCheckValue = "D5D44F";
	public String doubleKeyCheckValue = "13F5CC";
	
	@Test
	public void testPvkCheckValueDouble() {

		Pvk a = null ;
