package org.hive2hive.core.serializer;

import java.security.interfaces.RSAPrivateCrtKey;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;

/**
 * Provides classes for the respective security provider to serialize / deserialize using
 * {@link FSTSerializer}.
 * 
 * @author Nico
 *
 */
public interface ISecurityClassProvider {

	String getSecurityProvider();

	Class<? extends RSAPublicKey> getRSAPublicKeyClass();

	Class<? extends RSAPrivateKey> getRSAPrivateKeyClass();

	Class<? extends RSAPrivateCrtKey> getRSAPrivateCrtKeyClass();
}

@@ -296,16 +296,720 @@
 alizer%7D.
+ The problem is that different security providers use different key implementations.%0A * BouncyCastle uses for example %22org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey%22 whereas%0A * SpongyCastle uses %22org.spongycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey%22 and default Android%0A * security providers uses %22com.android.org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey%22. These%0A * class names are by default serialized and sent over the network. Recipients with other security providers%0A * cannot find the class by their names during decoding. Therefore, just indexes are sent over the network and%0A * mapped back to the key implementation stated through this implementation.
 %0A * %0A * 

Add documentation to ISecurityClassProvider