import java.security.AccessController;
import java.security.PrivilegedAction;
public final class ECCProvider extends java.security.Provider {
private static final String INFO = "Java2s's provider";
public ECCProvider() {
super("Java2s", 1.0, INFO);
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
put("KeyFactory.ECC", "com.Java2sKeyFactory");
put("KeyPairGenerator.ECC", "com.Java2sKeyPairGenerator");
return null;
}
});
}
}
|