PageRenderTime 23ms CodeModel.GetById 13ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/extern/spongycastle/prov/src/main/java/org/spongycastle/jcajce/provider/asymmetric/ECGOST.java

https://gitlab.com/vizilo/fdroidclient
Java | 39 lines | 31 code | 8 blank | 0 comment | 0 complexity | 0b65c4b6847bb412e6fe6b1f47771ba9 MD5 | raw file
 1package org.spongycastle.jcajce.provider.asymmetric;
 2
 3import org.spongycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
 4import org.spongycastle.jcajce.provider.asymmetric.ecgost.KeyFactorySpi;
 5import org.spongycastle.jcajce.provider.config.ConfigurableProvider;
 6import org.spongycastle.jcajce.provider.util.AsymmetricAlgorithmProvider;
 7
 8public class ECGOST
 9{
10    private static final String PREFIX = "org.spongycastle.jcajce.provider.asymmetric" + ".ecgost.";
11
12    public static class Mappings
13        extends AsymmetricAlgorithmProvider
14    {
15        public Mappings()
16        {
17        }
18        
19        public void configure(ConfigurableProvider provider)
20        {
21            provider.addAlgorithm("KeyFactory.ECGOST3410", PREFIX + "KeyFactorySpi");
22            provider.addAlgorithm("Alg.Alias.KeyFactory.GOST-3410-2001", "ECGOST3410");
23            provider.addAlgorithm("Alg.Alias.KeyFactory.ECGOST-3410", "ECGOST3410");
24
25            registerOid(provider, CryptoProObjectIdentifiers.gostR3410_2001, "ECGOST3410", new KeyFactorySpi());
26            registerOidAlgorithmParameters(provider, CryptoProObjectIdentifiers.gostR3410_2001, "ECGOST3410");
27
28            provider.addAlgorithm("KeyPairGenerator.ECGOST3410", PREFIX + "KeyPairGeneratorSpi");
29            provider.addAlgorithm("Alg.Alias.KeyPairGenerator.ECGOST-3410", "ECGOST3410");
30            provider.addAlgorithm("Alg.Alias.KeyPairGenerator.GOST-3410-2001", "ECGOST3410");
31
32            provider.addAlgorithm("Signature.ECGOST3410", PREFIX + "SignatureSpi");
33            provider.addAlgorithm("Alg.Alias.Signature.ECGOST-3410", "ECGOST3410");
34            provider.addAlgorithm("Alg.Alias.Signature.GOST-3410-2001", "ECGOST3410");
35
36            addSignatureAlgorithm(provider, "GOST3411", "ECGOST3410", PREFIX + "SignatureSpi", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
37        }
38    }
39}