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


Java GNUObjectIdentifiers类代码示例

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


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

示例1: getAlgorithm

import org.bouncycastle.asn1.gnu.GNUObjectIdentifiers; //导入依赖的package包/类
protected static String getAlgorithm(String algDetails)
{
    if (algDetails.indexOf('[') > 0)
    {
        return algDetails.substring(0, algDetails.indexOf('['));
    }

    if (algDetails.startsWith(NISTObjectIdentifiers.aes.getId()))
    {
        return "AES";
    }
    if (algDetails.startsWith(GNUObjectIdentifiers.Serpent.getId()))
    {
        return "Serpent";
    }

    String name = (String)nameTable.get(Strings.toUpperCase(algDetails));

    if (name != null)
    {
        return name;
    }

    return algDetails;
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:26,代码来源:BaseAgreementSpi.java

示例2: configure

import org.bouncycastle.asn1.gnu.GNUObjectIdentifiers; //导入依赖的package包/类
public void configure(ConfigurableProvider provider)
{

    provider.addAlgorithm("Cipher.Serpent", PREFIX + "$ECB");
    provider.addAlgorithm("KeyGenerator.Serpent", PREFIX + "$KeyGen");
    provider.addAlgorithm("AlgorithmParameters.Serpent", PREFIX + "$AlgParams");

    provider.addAlgorithm("Cipher.Tnepres", PREFIX + "$TECB");
    provider.addAlgorithm("KeyGenerator.Tnepres", PREFIX + "$TKeyGen");
    provider.addAlgorithm("AlgorithmParameters.Tnepres", PREFIX + "$TAlgParams");

    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_128_ECB, PREFIX + "$ECB");
    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_192_ECB, PREFIX + "$ECB");
    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_256_ECB, PREFIX + "$ECB");

    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_128_CBC, PREFIX + "$CBC");
    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_192_CBC, PREFIX + "$CBC");
    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_256_CBC, PREFIX + "$CBC");

    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_128_CFB, PREFIX + "$CFB");
    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_192_CFB, PREFIX + "$CFB");
    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_256_CFB, PREFIX + "$CFB");

    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_128_OFB, PREFIX + "$OFB");
    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_192_OFB, PREFIX + "$OFB");
    provider.addAlgorithm("Cipher", GNUObjectIdentifiers.Serpent_256_OFB, PREFIX + "$OFB");

    addGMacAlgorithm(provider, "SERPENT", PREFIX + "$SerpentGMAC", PREFIX + "$KeyGen");
    addGMacAlgorithm(provider, "TNEPRES", PREFIX + "$TSerpentGMAC", PREFIX + "$TKeyGen");
    addPoly1305Algorithm(provider, "SERPENT", PREFIX + "$Poly1305", PREFIX + "$Poly1305KeyGen");
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:32,代码来源:Serpent.java


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