本文整理汇总了Java中org.bouncycastle.asn1.ntt.NTTObjectIdentifiers类的典型用法代码示例。如果您正苦于以下问题:Java NTTObjectIdentifiers类的具体用法?Java NTTObjectIdentifiers怎么用?Java NTTObjectIdentifiers使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NTTObjectIdentifiers类属于org.bouncycastle.asn1.ntt包,在下文中一共展示了NTTObjectIdentifiers类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: determineKeyEncAlg
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
static AlgorithmIdentifier determineKeyEncAlg(KeyParameter key)
{
int length = key.getKey().length * 8;
ASN1ObjectIdentifier wrapOid;
if (length == 128)
{
wrapOid = NTTObjectIdentifiers.id_camellia128_wrap;
}
else if (length == 192)
{
wrapOid = NTTObjectIdentifiers.id_camellia192_wrap;
}
else if (length == 256)
{
wrapOid = NTTObjectIdentifiers.id_camellia256_wrap;
}
else
{
throw new IllegalArgumentException(
"illegal keysize in Camellia");
}
return new AlgorithmIdentifier(wrapOid); // parameters must be
// absent
}
示例2: DefaultSecretKeyProvider
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的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);
}
示例3: DefaultSecretKeyProvider
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的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);
}
示例4: configure
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void configure(ConfigurableProvider provider)
{
provider.addAlgorithm("AlgorithmParameters.CAMELLIA", PREFIX + "$AlgParams");
provider.addAlgorithm("Alg.Alias.AlgorithmParameters." + NTTObjectIdentifiers.id_camellia128_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameters." + NTTObjectIdentifiers.id_camellia192_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameters." + NTTObjectIdentifiers.id_camellia256_cbc, "CAMELLIA");
provider.addAlgorithm("AlgorithmParameterGenerator.CAMELLIA", PREFIX + "$AlgParamGen");
provider.addAlgorithm("Alg.Alias.AlgorithmParameterGenerator." + NTTObjectIdentifiers.id_camellia128_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameterGenerator." + NTTObjectIdentifiers.id_camellia192_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameterGenerator." + NTTObjectIdentifiers.id_camellia256_cbc, "CAMELLIA");
provider.addAlgorithm("Cipher.CAMELLIA", PREFIX + "$ECB");
provider.addAlgorithm("Cipher." + NTTObjectIdentifiers.id_camellia128_cbc, PREFIX + "$CBC");
provider.addAlgorithm("Cipher." + NTTObjectIdentifiers.id_camellia192_cbc, PREFIX + "$CBC");
provider.addAlgorithm("Cipher." + NTTObjectIdentifiers.id_camellia256_cbc, PREFIX + "$CBC");
provider.addAlgorithm("Cipher.CAMELLIARFC3211WRAP", PREFIX + "$RFC3211Wrap");
provider.addAlgorithm("Cipher.CAMELLIAWRAP", PREFIX + "$Wrap");
provider.addAlgorithm("Alg.Alias.Cipher." + NTTObjectIdentifiers.id_camellia128_wrap, "CAMELLIAWRAP");
provider.addAlgorithm("Alg.Alias.Cipher." + NTTObjectIdentifiers.id_camellia192_wrap, "CAMELLIAWRAP");
provider.addAlgorithm("Alg.Alias.Cipher." + NTTObjectIdentifiers.id_camellia256_wrap, "CAMELLIAWRAP");
provider.addAlgorithm("KeyGenerator.CAMELLIA", PREFIX + "$KeyGen");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia128_wrap, PREFIX + "$KeyGen128");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia192_wrap, PREFIX + "$KeyGen192");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia256_wrap, PREFIX + "$KeyGen256");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia128_cbc, PREFIX + "$KeyGen128");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia192_cbc, PREFIX + "$KeyGen192");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia256_cbc, PREFIX + "$KeyGen256");
addGMacAlgorithm(provider, "CAMELLIA", PREFIX + "$GMAC", PREFIX + "$KeyGen");
}
示例5: configure
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void configure(ConfigurableProvider provider)
{
provider.addAlgorithm("AlgorithmParameters.CAMELLIA", PREFIX + "$AlgParams");
provider.addAlgorithm("Alg.Alias.AlgorithmParameters", NTTObjectIdentifiers.id_camellia128_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameters", NTTObjectIdentifiers.id_camellia192_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameters", NTTObjectIdentifiers.id_camellia256_cbc, "CAMELLIA");
provider.addAlgorithm("AlgorithmParameterGenerator.CAMELLIA", PREFIX + "$AlgParamGen");
provider.addAlgorithm("Alg.Alias.AlgorithmParameterGenerator", NTTObjectIdentifiers.id_camellia128_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameterGenerator", NTTObjectIdentifiers.id_camellia192_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameterGenerator", NTTObjectIdentifiers.id_camellia256_cbc, "CAMELLIA");
provider.addAlgorithm("Cipher.CAMELLIA", PREFIX + "$ECB");
provider.addAlgorithm("Cipher", NTTObjectIdentifiers.id_camellia128_cbc, PREFIX + "$CBC");
provider.addAlgorithm("Cipher", NTTObjectIdentifiers.id_camellia192_cbc, PREFIX + "$CBC");
provider.addAlgorithm("Cipher", NTTObjectIdentifiers.id_camellia256_cbc, PREFIX + "$CBC");
provider.addAlgorithm("Cipher.CAMELLIARFC3211WRAP", PREFIX + "$RFC3211Wrap");
provider.addAlgorithm("Cipher.CAMELLIAWRAP", PREFIX + "$Wrap");
provider.addAlgorithm("Alg.Alias.Cipher", NTTObjectIdentifiers.id_camellia128_wrap, "CAMELLIAWRAP");
provider.addAlgorithm("Alg.Alias.Cipher", NTTObjectIdentifiers.id_camellia192_wrap, "CAMELLIAWRAP");
provider.addAlgorithm("Alg.Alias.Cipher", NTTObjectIdentifiers.id_camellia256_wrap, "CAMELLIAWRAP");
provider.addAlgorithm("KeyGenerator.CAMELLIA", PREFIX + "$KeyGen");
provider.addAlgorithm("KeyGenerator", NTTObjectIdentifiers.id_camellia128_wrap, PREFIX + "$KeyGen128");
provider.addAlgorithm("KeyGenerator", NTTObjectIdentifiers.id_camellia192_wrap, PREFIX + "$KeyGen192");
provider.addAlgorithm("KeyGenerator", NTTObjectIdentifiers.id_camellia256_wrap, PREFIX + "$KeyGen256");
provider.addAlgorithm("KeyGenerator", NTTObjectIdentifiers.id_camellia128_cbc, PREFIX + "$KeyGen128");
provider.addAlgorithm("KeyGenerator", NTTObjectIdentifiers.id_camellia192_cbc, PREFIX + "$KeyGen192");
provider.addAlgorithm("KeyGenerator", NTTObjectIdentifiers.id_camellia256_cbc, PREFIX + "$KeyGen256");
addGMacAlgorithm(provider, "CAMELLIA", PREFIX + "$GMAC", PREFIX + "$KeyGen");
addPoly1305Algorithm(provider, "CAMELLIA", PREFIX + "$Poly1305", PREFIX + "$Poly1305KeyGen");
}
示例6: performTest
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void performTest()
throws Exception
{
for (int i = 0; i != cipherTests.length; i += 4)
{
test(Integer.parseInt(cipherTests[i]),
Hex.decode(cipherTests[i + 1]),
Hex.decode(cipherTests[i + 2]),
Hex.decode(cipherTests[i + 3]));
}
byte[] kek1 = Hex.decode("000102030405060708090a0b0c0d0e0f");
byte[] in1 = Hex.decode("00112233445566778899aabbccddeeff");
byte[] out1 = Hex.decode("635d6ac46eedebd3a7f4a06421a4cbd1746b24795ba2f708");
wrapTest(1, "CamelliaWrap", kek1, in1, out1);
String[] oids = {
NTTObjectIdentifiers.id_camellia128_cbc.getId(),
NTTObjectIdentifiers.id_camellia192_cbc.getId(),
NTTObjectIdentifiers.id_camellia256_cbc.getId()
};
String[] names = {
"Camellia/CBC/PKCS7Padding",
"Camellia/CBC/PKCS7Padding",
"Camellia/CBC/PKCS7Padding"
};
oidTest(oids, names, 1);
String[] wrapOids = {
NTTObjectIdentifiers.id_camellia128_wrap.getId(),
NTTObjectIdentifiers.id_camellia192_wrap.getId(),
NTTObjectIdentifiers.id_camellia256_wrap.getId()
};
wrapOidTest(wrapOids, "CamelliaWrap");
}
示例7: configure
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void configure(ConfigurableProvider provider)
{
provider.addAlgorithm("AlgorithmParameters.CAMELLIA", PREFIX + "$AlgParams");
provider.addAlgorithm("Alg.Alias.AlgorithmParameters." + NTTObjectIdentifiers.id_camellia128_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameters." + NTTObjectIdentifiers.id_camellia192_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameters." + NTTObjectIdentifiers.id_camellia256_cbc, "CAMELLIA");
provider.addAlgorithm("AlgorithmParameterGenerator.CAMELLIA", PREFIX + "$AlgParamGen");
provider.addAlgorithm("Alg.Alias.AlgorithmParameterGenerator." + NTTObjectIdentifiers.id_camellia128_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameterGenerator." + NTTObjectIdentifiers.id_camellia192_cbc, "CAMELLIA");
provider.addAlgorithm("Alg.Alias.AlgorithmParameterGenerator." + NTTObjectIdentifiers.id_camellia256_cbc, "CAMELLIA");
provider.addAlgorithm("Cipher.CAMELLIA", PREFIX + "$ECB");
provider.addAlgorithm("Cipher." + NTTObjectIdentifiers.id_camellia128_cbc, PREFIX + "$CBC");
provider.addAlgorithm("Cipher." + NTTObjectIdentifiers.id_camellia192_cbc, PREFIX + "$CBC");
provider.addAlgorithm("Cipher." + NTTObjectIdentifiers.id_camellia256_cbc, PREFIX + "$CBC");
provider.addAlgorithm("Cipher.CAMELLIARFC3211WRAP", PREFIX + "$RFC3211Wrap");
provider.addAlgorithm("Cipher.CAMELLIAWRAP", PREFIX + "$Wrap");
provider.addAlgorithm("Alg.Alias.Cipher." + NTTObjectIdentifiers.id_camellia128_wrap, "CAMELLIAWRAP");
provider.addAlgorithm("Alg.Alias.Cipher." + NTTObjectIdentifiers.id_camellia192_wrap, "CAMELLIAWRAP");
provider.addAlgorithm("Alg.Alias.Cipher." + NTTObjectIdentifiers.id_camellia256_wrap, "CAMELLIAWRAP");
provider.addAlgorithm("KeyGenerator.CAMELLIA", PREFIX + "$KeyGen");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia128_wrap, PREFIX + "$KeyGen128");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia192_wrap, PREFIX + "$KeyGen192");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia256_wrap, PREFIX + "$KeyGen256");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia128_cbc, PREFIX + "$KeyGen128");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia192_cbc, PREFIX + "$KeyGen192");
provider.addAlgorithm("KeyGenerator." + NTTObjectIdentifiers.id_camellia256_cbc, PREFIX + "$KeyGen256");
addGMacAlgorithm(provider, "CAMELLIA", PREFIX + "$GMAC", PREFIX + "$KeyGen");
addPoly1305Algorithm(provider, "CAMELLIA", PREFIX + "$Poly1305", PREFIX + "$Poly1305KeyGen");
}
示例8: testKeyTransCamellia128
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void testKeyTransCamellia128()
throws Exception
{
tryKeyTrans(CMSEnvelopedDataGenerator.CAMELLIA128_CBC, NTTObjectIdentifiers.id_camellia128_cbc, DEROctetString.class);
}
示例9: testKeyTransCamellia192
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void testKeyTransCamellia192()
throws Exception
{
tryKeyTrans(CMSEnvelopedDataGenerator.CAMELLIA192_CBC, NTTObjectIdentifiers.id_camellia192_cbc, DEROctetString.class);
}
示例10: testKeyTransCamellia256
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void testKeyTransCamellia256()
throws Exception
{
tryKeyTrans(CMSEnvelopedDataGenerator.CAMELLIA256_CBC, NTTObjectIdentifiers.id_camellia256_cbc, DEROctetString.class);
}
示例11: testCamellia128KEK
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void testCamellia128KEK()
throws Exception
{
tryKekAlgorithm(CMSTestUtil.makeCamelliaKey(128), NTTObjectIdentifiers.id_camellia128_wrap);
}
示例12: testCamellia192KEK
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void testCamellia192KEK()
throws Exception
{
tryKekAlgorithm(CMSTestUtil.makeCamelliaKey(192), NTTObjectIdentifiers.id_camellia192_wrap);
}
示例13: testCamellia256KEK
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void testCamellia256KEK()
throws Exception
{
tryKekAlgorithm(CMSTestUtil.makeCamelliaKey(256), NTTObjectIdentifiers.id_camellia256_wrap);
}
示例14: testKeyTransCamellia128
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void testKeyTransCamellia128()
throws Exception
{
tryKeyTrans(CMSAlgorithm.CAMELLIA128_CBC, NTTObjectIdentifiers.id_camellia128_cbc, 16, DEROctetString.class);
}
示例15: testKeyTransCamellia192
import org.bouncycastle.asn1.ntt.NTTObjectIdentifiers; //导入依赖的package包/类
public void testKeyTransCamellia192()
throws Exception
{
tryKeyTrans(CMSAlgorithm.CAMELLIA192_CBC, NTTObjectIdentifiers.id_camellia192_cbc, 24, DEROctetString.class);
}