本文整理汇总了Java中org.bouncycastle.crypto.BufferedAsymmetricBlockCipher类的典型用法代码示例。如果您正苦于以下问题:Java BufferedAsymmetricBlockCipher类的具体用法?Java BufferedAsymmetricBlockCipher怎么用?Java BufferedAsymmetricBlockCipher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BufferedAsymmetricBlockCipher类属于org.bouncycastle.crypto包,在下文中一共展示了BufferedAsymmetricBlockCipher类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createCipherForAsymmetricBlockCipherMode
import org.bouncycastle.crypto.BufferedAsymmetricBlockCipher; //导入依赖的package包/类
private Cipher createCipherForAsymmetricBlockCipherMode(final String transformation, final AsymmetricBlockCipher modeWithEngine, final String engineName, final String modeName, final String paddingName)
throws NoSuchPaddingException
{
AsymmetricBlockCipher padding;
if (paddingName.isEmpty() || "NOPADDING".equals(paddingName))
padding = modeWithEngine;
else {
padding = createAsymmetricBlockCipherPadding(paddingName, modeWithEngine);
if (padding == null)
throw new NoSuchPaddingException("There is no asymmetric-block-cipher-padding registered with name \"" + paddingName + "\"!");
}
return new AsymmetricBlockCipherImpl(
transformation,
new BufferedAsymmetricBlockCipher(padding)
);
}
开发者ID:subshare,项目名称:subshare,代码行数:18,代码来源:CryptoRegistry.java
示例2: initFromSpec
import org.bouncycastle.crypto.BufferedAsymmetricBlockCipher; //导入依赖的package包/类
private void initFromSpec(
OAEPParameterSpec pSpec)
throws NoSuchPaddingException
{
MGF1ParameterSpec mgfParams = (MGF1ParameterSpec)pSpec.getMGFParameters();
Digest digest = DigestFactory.getDigest(mgfParams.getDigestAlgorithm());
if (digest == null)
{
throw new NoSuchPaddingException("no match on OAEP constructor for digest algorithm: "+ mgfParams.getDigestAlgorithm());
}
cipher = new BufferedAsymmetricBlockCipher(new OAEPEncoding(new ElGamalEngine(), digest, ((PSource.PSpecified)pSpec.getPSource()).getValue()));
paramSpec = pSpec;
}
开发者ID:Appdome,项目名称:ipack,代码行数:16,代码来源:CipherSpi.java
示例3: CipherSpi
import org.bouncycastle.crypto.BufferedAsymmetricBlockCipher; //导入依赖的package包/类
public CipherSpi(
AsymmetricBlockCipher engine)
{
cipher = new BufferedAsymmetricBlockCipher(engine);
}
开发者ID:Appdome,项目名称:ipack,代码行数:6,代码来源:CipherSpi.java
示例4: AsymmetricBlockCipherImpl
import org.bouncycastle.crypto.BufferedAsymmetricBlockCipher; //导入依赖的package包/类
public AsymmetricBlockCipherImpl(final String transformation, final BufferedAsymmetricBlockCipher delegate) {
super(transformation);
this.delegate = delegate;
}
开发者ID:subshare,项目名称:subshare,代码行数:5,代码来源:AsymmetricBlockCipherImpl.java
注:本文中的org.bouncycastle.crypto.BufferedAsymmetricBlockCipher类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论