Java 类org.bouncycastle.crypto.BufferedAsymmetricBlockCipher 实例源码

项目:subshare    文件:CryptoRegistry.java   
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)
    );
}
项目:ipack    文件:CipherSpi.java   
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;
}
项目:Aki-SSL    文件:CipherSpi.java   
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;
}
项目:CryptMeme    文件:CipherSpi.java   
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;
}
项目:irma_future_id    文件:CipherSpi.java   
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;
}
项目:bc-java    文件:CipherSpi.java   
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;
}
项目:ipack    文件:CipherSpi.java   
public CipherSpi(
    AsymmetricBlockCipher engine)
{
    cipher = new BufferedAsymmetricBlockCipher(engine);
}
项目:Aki-SSL    文件:CipherSpi.java   
public CipherSpi(
    AsymmetricBlockCipher engine)
{
    cipher = new BufferedAsymmetricBlockCipher(engine);
}
项目:subshare    文件:AsymmetricBlockCipherImpl.java   
public AsymmetricBlockCipherImpl(final String transformation, final BufferedAsymmetricBlockCipher delegate) {
    super(transformation);
    this.delegate = delegate;
}
项目:CryptMeme    文件:CipherSpi.java   
public CipherSpi(
    AsymmetricBlockCipher engine)
{
    cipher = new BufferedAsymmetricBlockCipher(engine);
}
项目:irma_future_id    文件:CipherSpi.java   
public CipherSpi(
    AsymmetricBlockCipher engine)
{
    cipher = new BufferedAsymmetricBlockCipher(engine);
}
项目:irma_future_id    文件:CipherSpi.java   
public CipherSpi(
    AsymmetricBlockCipher engine)
{
    cipher = new BufferedAsymmetricBlockCipher(engine);
}
项目:bc-java    文件:CipherSpi.java   
public CipherSpi(
    AsymmetricBlockCipher engine)
{
    cipher = new BufferedAsymmetricBlockCipher(engine);
}
项目:bc-java    文件:CipherSpi.java   
public CipherSpi(
    AsymmetricBlockCipher engine)
{
    cipher = new BufferedAsymmetricBlockCipher(engine);
}