/*
 * Copyright (C)2009 - SSHJ Contributors
 *
 * 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 net.schmizz.sshj;

import net.schmizz.sshj.transport.random.JCERandom;
import net.schmizz.sshj.transport.random.SingletonRandomFactory;

public class AndroidConfig
        extends DefaultConfig {

    @Override
    protected void initRandomFactory(boolean ignored) {
        setRandomFactory(new SingletonRandomFactory(new JCERandom.Factory()));
    }

}

@@ -1,10 +1,11 @@
 /*
+*
 %0A * Copy
@@ -14,24 +14,19 @@
 ght 
-(C)
 2009 
-- SSHJ C
+sshj c
 ontr
@@ -633,178 +633,1293 @@
 ort 
-net.schmizz.sshj.transport.random.JCERandom;%0Aimport net.schmizz.sshj.transport.random.SingletonRandomFactory;%0A%0Apublic class AndroidConfig%0A        extends DefaultConfig %7B%0A
+java.security.Provider;%0Aimport java.security.Security;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport net.schmizz.sshj.common.SecurityUtils;%0Aimport net.schmizz.sshj.signature.SignatureDSA;%0Aimport net.schmizz.sshj.signature.SignatureRSA;%0Aimport net.schmizz.sshj.transport.random.JCERandom;%0Aimport net.schmizz.sshj.transport.random.SingletonRandomFactory;%0A%0Apublic class AndroidConfig%0A        extends DefaultConfig %7B%0A%0A    static %7B%0A        final Logger log = LoggerFactory.getLogger(AndroidConfig.class);%0A        SecurityUtils.setRegisterBouncyCastle(false);%0A        try %7B%0A            Class%3C?%3E bcpClazz = Class.forName(%22org.spongycastle.jce.provider.BouncyCastleProvider%22);%0A            Security.addProvider((Provider) bcpClazz.newInstance());%0A            SecurityUtils.setSecurityProvider(%22SC%22);%0A        %7D catch (ClassNotFoundException e) %7B%0A            log.info(%22SpongyCastle was not found.%22);%0A        %7D catch (IllegalAccessException e) %7B%0A            log.error(%22IllegalAccessException%22, e);%0A        %7D catch (InstantiationException e) %7B%0A            log.info(%22InstantiationException%22, e);%0A        %7D%0A    %7D%0A%0A    // don't add ECDSA%0A    protected void initSignatureFactories() %7B%0A        setSignatureFactories(new SignatureRSA.Factory(), new SignatureDSA.Factory());%0A    %7D%0A    
 %0A   

Update AndroidConfig.java