Security Java Tutorial

import java.security.Provider;
public class YourOwnProvider extends Provider {
  public YourOwnProvider() {
    super("YourOwn", 1.0, "YourOwn Security Provider v1.0");
    put("KeyGenerator.XOR", "yourPackageName.XORKeyGenerator");
    put("KeyPairGenerator.YourOwn", "yourPackageName.YourOwnKeyPairGenerator");
    put("KeyFactory.YourOwn", "yourPackageName.YourOwnKeyFactory");
    put("MessageDigest.YourOwn", "yourPackageName.YourOwnMessageDigest");
    put("Signature.YourOwnwithSHA", "yourPackageName.YourOwnSignature");
    put("Cipher.XOR", "yourPackageName.XORCipher");
    put("KeyManagerFactory.YourOwn", "yourPackageName.SSLKeyManagerFactory");
    put("Alg.Alias.MessageDigest.SHA-1", "SHA");
  }
  public static final synchronized void verifyForJCE() {
    throw new SecurityException("Can't verify for JCE");
  }
}