本文整理汇总了Java中org.bouncycastle.crypto.CipherKeyGenerator类的典型用法代码示例。如果您正苦于以下问题:Java CipherKeyGenerator类的具体用法?Java CipherKeyGenerator怎么用?Java CipherKeyGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CipherKeyGenerator类属于org.bouncycastle.crypto包,在下文中一共展示了CipherKeyGenerator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CMSOutputEncryptor
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
CMSOutputEncryptor(ASN1ObjectIdentifier encryptionOID, int keySize, SecureRandom random)
throws CMSException
{
if (random == null)
{
random = new SecureRandom();
}
CipherKeyGenerator keyGen = helper.createKeyGenerator(encryptionOID, random);
encKey = new KeyParameter(keyGen.generateKey());
algorithmIdentifier = helper.generateAlgorithmIdentifier(encryptionOID, encKey, random);
cipher = helper.createContentCipher(true, encKey, algorithmIdentifier);
}
示例2: BaseKeyGenerator
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
protected BaseKeyGenerator(
String algName,
int defaultKeySize,
CipherKeyGenerator engine)
{
this.algName = algName;
this.keySize = this.defaultKeySize = defaultKeySize;
this.engine = engine;
}
示例3: createCipherKeyGenerator
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
private CipherKeyGenerator createCipherKeyGenerator(SecureRandom random, int keySize)
{
CipherKeyGenerator keyGen = new CipherKeyGenerator();
keyGen.init(new KeyGenerationParameters(random, keySize));
return keyGen;
}
示例4: createNewSharedKey
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
/**
* Generate a new shared secret AES key from a secure random source
*/
public static SecretKey createNewSharedKey()
{
CipherKeyGenerator cipherkeygenerator = new CipherKeyGenerator();
cipherkeygenerator.init(new KeyGenerationParameters(new SecureRandom(), 128));
return new SecretKeySpec(cipherkeygenerator.generateKey(), "AES");
}
示例5: KeyGen
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
public KeyGen()
{
super("RC6", 256, new CipherKeyGenerator());
}
示例6: KeyGen
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
public KeyGen()
{
super("XTEA", 128, new CipherKeyGenerator());
}
示例7: KeyGen
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
public KeyGen()
{
super("Grain128", 128, new CipherKeyGenerator());
}
示例8: KeyGen
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
public KeyGen()
{
super("SEED", 128, new CipherKeyGenerator());
}
示例9: KeyGen
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
public KeyGen()
{
super("VMPC", 128, new CipherKeyGenerator());
}
示例10: KeyGen
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
public KeyGen()
{
super("Skipjack", 80, new CipherKeyGenerator());
}
示例11: KeyGen
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
public KeyGen(int keySize)
{
super("GOST28147", keySize, new CipherKeyGenerator());
}
示例12: KeyGen
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
public KeyGen()
{
super("Twofish", 256, new CipherKeyGenerator());
}
示例13: KeyGen
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
public KeyGen()
{
super("HC256", 256, new CipherKeyGenerator());
}
示例14: KeyGen
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
public KeyGen()
{
super("RC4", 128, new CipherKeyGenerator());
}
示例15: KeyGen
import org.bouncycastle.crypto.CipherKeyGenerator; //导入依赖的package包/类
public KeyGen()
{
super("TEA", 128, new CipherKeyGenerator());
}