当前位置: 首页>>代码示例>>Java>>正文


Java CryptoProObjectIdentifiers类代码示例

本文整理汇总了Java中org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers的典型用法代码示例。如果您正苦于以下问题:Java CryptoProObjectIdentifiers类的具体用法?Java CryptoProObjectIdentifiers怎么用?Java CryptoProObjectIdentifiers使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CryptoProObjectIdentifiers类属于org.bouncycastle.asn1.cryptopro包,在下文中一共展示了CryptoProObjectIdentifiers类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configure

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public void configure(ConfigurableProvider provider)
{
    provider.addAlgorithm("KeyFactory.ECGOST3410", PREFIX + "KeyFactorySpi");
    provider.addAlgorithm("Alg.Alias.KeyFactory.GOST-3410-2001", "ECGOST3410");
    provider.addAlgorithm("Alg.Alias.KeyFactory.ECGOST-3410", "ECGOST3410");

    registerOid(provider, CryptoProObjectIdentifiers.gostR3410_2001, "ECGOST3410", new KeyFactorySpi());
    registerOidAlgorithmParameters(provider, CryptoProObjectIdentifiers.gostR3410_2001, "ECGOST3410");

    provider.addAlgorithm("KeyPairGenerator.ECGOST3410", PREFIX + "KeyPairGeneratorSpi");
    provider.addAlgorithm("Alg.Alias.KeyPairGenerator.ECGOST-3410", "ECGOST3410");
    provider.addAlgorithm("Alg.Alias.KeyPairGenerator.GOST-3410-2001", "ECGOST3410");

    provider.addAlgorithm("Signature.ECGOST3410", PREFIX + "SignatureSpi");
    provider.addAlgorithm("Alg.Alias.Signature.ECGOST-3410", "ECGOST3410");
    provider.addAlgorithm("Alg.Alias.Signature.GOST-3410-2001", "ECGOST3410");

    addSignatureAlgorithm(provider, "GOST3411", "ECGOST3410", PREFIX + "SignatureSpi", CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:20,代码来源:ECGOST.java

示例2: DefaultSecretKeyProvider

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
DefaultSecretKeyProvider()
{
    Map keySizes = new HashMap();

    keySizes.put(new ASN1ObjectIdentifier("1.2.840.113533.7.66.10"), Integers.valueOf(128));

    keySizes.put(PKCSObjectIdentifiers.des_EDE3_CBC, Integers.valueOf(192));

    keySizes.put(NISTObjectIdentifiers.id_aes128_CBC, Integers.valueOf(128));
    keySizes.put(NISTObjectIdentifiers.id_aes192_CBC, Integers.valueOf(192));
    keySizes.put(NISTObjectIdentifiers.id_aes256_CBC, Integers.valueOf(256));

    keySizes.put(NTTObjectIdentifiers.id_camellia128_cbc, Integers.valueOf(128));
    keySizes.put(NTTObjectIdentifiers.id_camellia192_cbc, Integers.valueOf(192));
    keySizes.put(NTTObjectIdentifiers.id_camellia256_cbc, Integers.valueOf(256));

    keySizes.put(CryptoProObjectIdentifiers.gostR28147_gcfb, Integers.valueOf(256));

    KEY_SIZES = Collections.unmodifiableMap(keySizes);
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:21,代码来源:PKCS12KeyStoreSpi.java

示例3: DefaultSecretKeyProvider

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
DefaultSecretKeyProvider()
{
    Map keySizes = new HashMap();

    keySizes.put(new ASN1ObjectIdentifier("1.2.840.113533.7.66.10"), Integers.valueOf(128));

    keySizes.put(PKCSObjectIdentifiers.des_EDE3_CBC.getId(), Integers.valueOf(192));

    keySizes.put(NISTObjectIdentifiers.id_aes128_CBC, Integers.valueOf(128));
    keySizes.put(NISTObjectIdentifiers.id_aes192_CBC, Integers.valueOf(192));
    keySizes.put(NISTObjectIdentifiers.id_aes256_CBC, Integers.valueOf(256));

    keySizes.put(NTTObjectIdentifiers.id_camellia128_cbc, Integers.valueOf(128));
    keySizes.put(NTTObjectIdentifiers.id_camellia192_cbc, Integers.valueOf(192));
    keySizes.put(NTTObjectIdentifiers.id_camellia256_cbc, Integers.valueOf(256));

    keySizes.put(CryptoProObjectIdentifiers.gostR28147_gcfb, Integers.valueOf(256));

    KEY_SIZES = Collections.unmodifiableMap(keySizes);
}
 
开发者ID:NoYouShutup,项目名称:CryptMeme,代码行数:21,代码来源:PKCS12KeyStoreSpi.java

示例4: GOST3410ParameterSpec

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public GOST3410ParameterSpec(
    GOST3410PublicKeyParameterSetSpec spec)
{
    this.keyParameters = spec;
    this.digestParamSetOID = CryptoProObjectIdentifiers.gostR3411_94_CryptoProParamSet.getId();
    this.encryptionParamSetOID = null;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:8,代码来源:GOST3410ParameterSpec.java

示例5: configure

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public void configure(ConfigurableProvider provider)
{
    provider.addAlgorithm("Cipher.GOST28147", PREFIX + "$ECB");
    provider.addAlgorithm("Alg.Alias.Cipher.GOST", "GOST28147");
    provider.addAlgorithm("Alg.Alias.Cipher.GOST-28147", "GOST28147");
    provider.addAlgorithm("Cipher." + CryptoProObjectIdentifiers.gostR28147_cbc, PREFIX + "$CBC");

    provider.addAlgorithm("KeyGenerator.GOST28147", PREFIX + "$KeyGen");
    provider.addAlgorithm("Alg.Alias.KeyGenerator.GOST", "GOST28147");
    provider.addAlgorithm("Alg.Alias.KeyGenerator.GOST-28147", "GOST28147");
    provider.addAlgorithm("Alg.Alias.KeyGenerator." + CryptoProObjectIdentifiers.gostR28147_cbc, "GOST28147");

    provider.addAlgorithm("Mac.GOST28147MAC", PREFIX + "$Mac");
    provider.addAlgorithm("Alg.Alias.Mac.GOST28147", "GOST28147MAC");
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:16,代码来源:GOST28147.java

示例6: configure

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public void configure(ConfigurableProvider provider)
{
    provider.addAlgorithm("MessageDigest.GOST3411", PREFIX + "$Digest");
    provider.addAlgorithm("Alg.Alias.MessageDigest.GOST", "GOST3411");
    provider.addAlgorithm("Alg.Alias.MessageDigest.GOST-3411", "GOST3411");
    provider.addAlgorithm("Alg.Alias.MessageDigest." + CryptoProObjectIdentifiers.gostR3411, "GOST3411");

    addHMACAlgorithm(provider, "GOST3411", PREFIX + "$HashMac", PREFIX + "$KeyGenerator");
    addHMACAlias(provider, "GOST3411", CryptoProObjectIdentifiers.gostR3411);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:11,代码来源:GOST3411.java

示例7: generatePrivate

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public PrivateKey generatePrivate(PrivateKeyInfo keyInfo)
    throws IOException
{
    ASN1ObjectIdentifier algOid = keyInfo.getPrivateKeyAlgorithm().getAlgorithm();

    if (algOid.equals(CryptoProObjectIdentifiers.gostR3410_94))
    {
        return new BCGOST3410PrivateKey(keyInfo);
    }
    else
    {
        throw new IOException("algorithm identifier " + algOid + " in key not recognised");
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:15,代码来源:KeyFactorySpi.java

示例8: generatePublic

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public PublicKey generatePublic(SubjectPublicKeyInfo keyInfo)
    throws IOException
{
    ASN1ObjectIdentifier algOid = keyInfo.getAlgorithm().getAlgorithm();

    if (algOid.equals(CryptoProObjectIdentifiers.gostR3410_94))
    {
        return new BCGOST3410PublicKey(keyInfo);
    }
    else
    {
        throw new IOException("algorithm identifier " + algOid + " in key not recognised");
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:15,代码来源:KeyFactorySpi.java

示例9: generateKeyPair

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public KeyPair generateKeyPair()
{
    if (!initialised)
    {
        init(new GOST3410ParameterSpec(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_A.getId()), new SecureRandom());
    }

    AsymmetricCipherKeyPair pair = engine.generateKeyPair();
    GOST3410PublicKeyParameters pub = (GOST3410PublicKeyParameters)pair.getPublic();
    GOST3410PrivateKeyParameters priv = (GOST3410PrivateKeyParameters)pair.getPrivate();

    return new KeyPair(new BCGOST3410PublicKey(pub, gost3410Params), new BCGOST3410PrivateKey(priv, gost3410Params));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:14,代码来源:KeyPairGeneratorSpi.java

示例10: configure

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public void configure(ConfigurableProvider provider)
{
    provider.addAlgorithm("KeyPairGenerator.GOST3410", PREFIX + "KeyPairGeneratorSpi");
    provider.addAlgorithm("Alg.Alias.KeyPairGenerator.GOST-3410", "GOST3410");
    provider.addAlgorithm("Alg.Alias.KeyPairGenerator.GOST-3410-94", "GOST3410");

    provider.addAlgorithm("KeyFactory.GOST3410", PREFIX + "KeyFactorySpi");
    provider.addAlgorithm("Alg.Alias.KeyFactory.GOST-3410", "GOST3410");
    provider.addAlgorithm("Alg.Alias.KeyFactory.GOST-3410-94", "GOST3410");


    provider.addAlgorithm("AlgorithmParameters.GOST3410", PREFIX + "AlgorithmParametersSpi");
    provider.addAlgorithm("AlgorithmParameterGenerator.GOST3410", PREFIX + "AlgorithmParameterGeneratorSpi");

    registerOid(provider, CryptoProObjectIdentifiers.gostR3410_94, "GOST3410", new KeyFactorySpi());
    registerOidAlgorithmParameters(provider, CryptoProObjectIdentifiers.gostR3410_94, "GOST3410");

    provider.addAlgorithm("Signature.GOST3410", PREFIX + "SignatureSpi");
    provider.addAlgorithm("Alg.Alias.Signature.GOST-3410", "GOST3410");
    provider.addAlgorithm("Alg.Alias.Signature.GOST-3410-94", "GOST3410");
    provider.addAlgorithm("Alg.Alias.Signature.GOST3411withGOST3410", "GOST3410");
    provider.addAlgorithm("Alg.Alias.Signature.GOST3411WITHGOST3410", "GOST3410");
    provider.addAlgorithm("Alg.Alias.Signature.GOST3411WithGOST3410", "GOST3410");
    provider.addAlgorithm("Alg.Alias.Signature." + CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94, "GOST3410");


    provider.addAlgorithm("Alg.Alias.AlgorithmParameterGenerator.GOST-3410", "GOST3410");
    provider.addAlgorithm("Alg.Alias.AlgorithmParameters.GOST-3410", "GOST3410");
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:30,代码来源:GOST.java

示例11: generatePrivate

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public PrivateKey generatePrivate(PrivateKeyInfo keyInfo)
    throws IOException
{
    ASN1ObjectIdentifier algOid = keyInfo.getPrivateKeyAlgorithm().getAlgorithm();

    if (algOid.equals(CryptoProObjectIdentifiers.gostR3410_2001))
    {
        return new BCECGOST3410PrivateKey(keyInfo);
    }
    else
    {
        throw new IOException("algorithm identifier " + algOid + " in key not recognised");
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:15,代码来源:KeyFactorySpi.java

示例12: generatePublic

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public PublicKey generatePublic(SubjectPublicKeyInfo keyInfo)
    throws IOException
{
    ASN1ObjectIdentifier algOid = keyInfo.getAlgorithm().getAlgorithm();

    if (algOid.equals(CryptoProObjectIdentifiers.gostR3410_2001))
    {
        return new BCECGOST3410PublicKey(keyInfo);
    }
    else
    {
        throw new IOException("algorithm identifier " + algOid + " in key not recognised");
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:15,代码来源:KeyFactorySpi.java

示例13: configure

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public void configure(ConfigurableProvider provider)
{
    provider.addAlgorithm("Cipher.GOST28147", PREFIX + "$ECB");
    provider.addAlgorithm("Alg.Alias.Cipher.GOST", "GOST28147");
    provider.addAlgorithm("Alg.Alias.Cipher.GOST-28147", "GOST28147");
    provider.addAlgorithm("Cipher." + CryptoProObjectIdentifiers.gostR28147_gcfb, PREFIX + "$GCFB");

    provider.addAlgorithm("KeyGenerator.GOST28147", PREFIX + "$KeyGen");
    provider.addAlgorithm("Alg.Alias.KeyGenerator.GOST", "GOST28147");
    provider.addAlgorithm("Alg.Alias.KeyGenerator.GOST-28147", "GOST28147");
    provider.addAlgorithm("Alg.Alias.KeyGenerator." + CryptoProObjectIdentifiers.gostR28147_gcfb, "GOST28147");

    provider.addAlgorithm("Mac.GOST28147MAC", PREFIX + "$Mac");
    provider.addAlgorithm("Alg.Alias.Mac.GOST28147", "GOST28147MAC");
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:16,代码来源:GOST28147.java

示例14: getDigestCode

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
private int getDigestCode(ASN1ObjectIdentifier algorithm)
    throws InvalidKeySpecException
{
    if (algorithm.equals(CryptoProObjectIdentifiers.gostR3411Hmac))
    {
        return GOST3411;
    }
    else if (algorithm.equals(PKCSObjectIdentifiers.id_hmacWithSHA1))
    {
        return SHA1;
    }

    throw new InvalidKeySpecException("Invalid KeySpec: unknown PRF algorithm " + algorithm);
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:15,代码来源:PBEPBKDF2.java

示例15: configure

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; //导入依赖的package包/类
public void configure(ConfigurableProvider provider)
{
    provider.addAlgorithm("MessageDigest.GOST3411", PREFIX + "$Digest");
    provider.addAlgorithm("Alg.Alias.MessageDigest.GOST", "GOST3411");
    provider.addAlgorithm("Alg.Alias.MessageDigest.GOST-3411", "GOST3411");
    provider.addAlgorithm("Alg.Alias.MessageDigest." + CryptoProObjectIdentifiers.gostR3411, "GOST3411");

    provider.addAlgorithm("SecretKeyFactory.PBEWITHHMACGOST3411", PREFIX + "$PBEWithMacKeyFactory");
    provider.addAlgorithm("Alg.Alias.SecretKeyFactory." + CryptoProObjectIdentifiers.gostR3411, "PBEWITHHMACGOST3411");

    addHMACAlgorithm(provider, "GOST3411", PREFIX + "$HashMac", PREFIX + "$KeyGenerator");
    addHMACAlias(provider, "GOST3411", CryptoProObjectIdentifiers.gostR3411);
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:14,代码来源:GOST3411.java


注:本文中的org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。