@@ -0,0 +1,2199 @@
+/*%0A * Copyright 2017 Zhongan.com All right reserved. This software is the%0A * confidential and proprietary information of Zhongan.com (%22Confidential%0A * Information%22). You shall not disclose such Confidential Information and shall%0A * use it only in accordance with the terms of the license agreement you entered%0A * into with Zhongan.com.%0A */%0Apackage com.doctor.commons.core.crypter;%0A%0Aimport java.security.Provider;%0Aimport java.security.Provider.Service;%0Aimport java.security.Security;%0Aimport java.util.Collections;%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0Aimport com.doctor.beaver.annotation.Immutable;%0A%0A/**%0A * %E5%AE%89%E5%85%A8%E7%AE%97%E6%B3%95%0A * %0A * @author sdcuike Created At 2017%E5%B9%B41%E6%9C%8818%E6%97%A5 14:38:39%0A */%0A@Immutable%0Apublic final class SecurityAlgorithmsUtils %7B%0A%0A    public static Set%3CService%3E getAllSecurityService() %7B%0A        Set%3CService%3E set = new HashSet%3C%3E();%0A%0A        for (Provider provider : Security.getProviders()) %7B%0A            set.addAll(provider.getServices());%0A        %7D%0A%0A        return Collections.unmodifiableSet(set);%0A    %7D%0A%0A    public static Set%3CService%3E getAllSecurityServiceByType(ServiceType serviceType) %7B%0A        Set%3CService%3E set = new HashSet%3C%3E();%0A%0A        for (Provider provider : Security.getProviders()) %7B%0A            for (Service service : provider.getServices()) %7B%0A                if (service.getType().equals(serviceType.name())) %7B%0A                    set.add(service);%0A                %7D%0A            %7D%0A        %7D%0A%0A        return Collections.unmodifiableSet(set);%0A    %7D%0A%0A    public enum ServiceType %7B%0A        KeyFactory,%0A        TransformService,%0A        CertPathBuilder,%0A        Cipher,%0A        SecureRandom,%0A        Signature,%0A        AlgorithmParameterGenerator,%0A        KeyPairGenerator,%0A        XMLSignatureFactory,%0A        CertificateFactory,%0A        MessageDigest,%0A        KeyInfoFactory,%0A        KeyAgreement,%0A        CertStore,%0A        Configuration,%0A        SSLContext,%0A        SaslServerFactory,%0A        AlgorithmParameters,%0A        TrustManagerFactory,%0A        GssApiMechanism,%0A        TerminalFactory,%0A        KeyGenerator,%0A        Mac,%0A        CertPathValidator,%0A        Policy,%0A        SaslClientFactory,%0A        SecretKeyFactory,%0A        KeyManagerFactory,%0A        KeyStore;%0A    %7D%0A%7D%0A

add SecurityAlgorithmsUtils