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


Java IESParameterSpec类代码示例

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


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

示例1: engineInit

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
public void engineInit(
    int opmode,
    Key key,
    AlgorithmParameters params,
    SecureRandom random)
    throws InvalidKeyException, InvalidAlgorithmParameterException
{
    AlgorithmParameterSpec paramSpec = null;

    if (params != null)
    {
        try
        {
            paramSpec = params.getParameterSpec(IESParameterSpec.class);
        }
        catch (Exception e)
        {
            throw new InvalidAlgorithmParameterException("cannot recognise parameters: " + e.toString());
        }
    }

    engineParam = params;
    engineInit(opmode, key, paramSpec, random);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:25,代码来源:IESCipher.java

示例2: engineInit

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
public void engineInit(
    int opmode,
    Key key,
    AlgorithmParameters params,
    SecureRandom random)
    throws InvalidKeyException, InvalidAlgorithmParameterException
{
    AlgorithmParameterSpec paramSpec = null;

    if (params != null)
    {
        try
        {
            paramSpec = params.getParameterSpec(IESParameterSpec.class);
        }
        catch (Exception e)
        {
            throw new InvalidAlgorithmParameterException("cannot recognise parameters: " + e.toString());
        }
    }

    engineParam = params;
    engineInit(opmode, key, paramSpec, random);

}
 
开发者ID:Appdome,项目名称:ipack,代码行数:26,代码来源:IESCipher.java

示例3: guessParameterSpec

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
public static IESParameterSpec guessParameterSpec(IESEngine engine)
{
    if (engine.getCipher() == null)
    {
        return new IESParameterSpec(null, null, 128);
    }
    else if (engine.getCipher().getUnderlyingCipher().getAlgorithmName().equals("DES") ||
            engine.getCipher().getUnderlyingCipher().getAlgorithmName().equals("RC2") ||
            engine.getCipher().getUnderlyingCipher().getAlgorithmName().equals("RC5-32") ||
            engine.getCipher().getUnderlyingCipher().getAlgorithmName().equals("RC5-64"))
    {
        return new IESParameterSpec(null, null, 64, 64);
    }
    else if (engine.getCipher().getUnderlyingCipher().getAlgorithmName().equals("SKIPJACK"))
    {
        return new IESParameterSpec(null, null, 80, 80);
    }
    else if (engine.getCipher().getUnderlyingCipher().getAlgorithmName().equals("GOST28147"))
    {
        return new IESParameterSpec(null, null, 256, 256);
    }

    return new IESParameterSpec(null, null, 128, 128);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:25,代码来源:IESUtil.java

示例4: itsEceisEncryptSymmetricKeyVer1

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
/**
 * Help method to perform a ECIES encryption to a recipient of a symmetric key according to the protool version 1 standard. 
 * 
 * @param publicKeyAlgorithm the algorithm used.
 * @param encryptionKey the public encryption key of the recipient
 * @param symmetricKey the symmetric key to encrypt
 * @return a EciesNistP256EncryptedKey to be included in a SecureMessage header.
 * 
 * @throws InvalidKeyException if supplied key was corrupt.
 * @throws InvalidAlgorithmParameterException if algorithm was badly specified.
 * @throws IllegalBlockSizeException if encrypted data was corrupt.
 * @throws BadPaddingException if encrypted data was corrupt.
 * @throws IllegalArgumentException if arguments where invalid or algorithm not supported.
 * @throws InvalidKeySpecException if supplied key specification was faulty.
 * @throws IOException if communication problem occurred with underlying systems.
 */
protected EciesNistP256EncryptedKey itsEceisEncryptSymmetricKeyVer1(PublicKeyAlgorithm publicKeyAlgorithm, PublicKey encryptionKey, Key symmetricKey) throws InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, IllegalArgumentException, InvalidKeySpecException, IOException{
	if(publicKeyAlgorithm != PublicKeyAlgorithm.ecies_nistp256){
		throw new IllegalArgumentException("Unsupported encryption public key algorithm: " + publicKeyAlgorithm);
	}
	byte[] keyData = symmetricKey.getEncoded();
	
	IESCipher eCIESCipher = new ECIES();
	eCIESCipher.engineInit(Cipher.ENCRYPT_MODE, encryptionKey, new IESParameterSpec(null, null, 128),secureRandom);
			
	byte[] encryptedData = eCIESCipher.engineDoFinal(keyData, 0, keyData.length);
	
	byte[] v = new byte[ECIES_NIST_P256_V_LENGTH_VER1];
	System.arraycopy(encryptedData, 0, v, 0,ECIES_NIST_P256_V_LENGTH_VER1);
       
       EccPoint p = new EccPoint(publicKeyAlgorithm);
       p.decode(new DataInputStream(new ByteArrayInputStream(v)));
       
	byte[] c = new byte[publicKeyAlgorithm.getRelatedSymmetricAlgorithm().getKeyLength()];
	byte[] t = new byte[EciesNistP256EncryptedKey.VER1_OUTPUT_TAG_LENGTH];
	System.arraycopy(encryptedData, ECIES_NIST_P256_V_LENGTH_VER1, c, 0, publicKeyAlgorithm.getRelatedSymmetricAlgorithm().getKeyLength());
	System.arraycopy(encryptedData, ECIES_NIST_P256_V_LENGTH_VER1 + publicKeyAlgorithm.getRelatedSymmetricAlgorithm().getKeyLength(), t, 0, EciesNistP256EncryptedKey.VER1_OUTPUT_TAG_LENGTH);
	
	return new EciesNistP256EncryptedKey(1,publicKeyAlgorithm, p, c,t); 
}
 
开发者ID:pvendil,项目名称:c2c-common,代码行数:41,代码来源:DefaultCryptoManager.java

示例5: itsEceisEncryptSymmetricKeyVer2

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
/**
 * Help method to perform a ECIES encryption to a recipient of a symmetric key according to the protocol version 2 standard. 
 * 
 * @param publicKeyAlgorithm the algorithm used.
 * @param encryptionKey the public encryption key of the recipient
 * @param symmetricKey the symmetric key to encrypt
 * @return a EciesNistP256EncryptedKey to be included in a SecureMessage header.
 * 
 * @throws InvalidKeyException if supplied key was corrupt.
 * @throws InvalidAlgorithmParameterException if algorithm was badly specified.
 * @throws IllegalBlockSizeException if encrypted data was corrupt.
 * @throws BadPaddingException if encrypted data was corrupt.
 * @throws IllegalArgumentException if arguments where invalid or algorithm not supported.
 * @throws InvalidKeySpecException if supplied key specification was faulty.
 * @throws IOException if communication problem occurred with underlying systems.
 */
protected EciesNistP256EncryptedKey itsEceisEncryptSymmetricKeyVer2(PublicKeyAlgorithm publicKeyAlgorithm, PublicKey encryptionKey, Key symmetricKey) throws InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, IllegalArgumentException, InvalidKeySpecException, IOException{
	if(publicKeyAlgorithm != PublicKeyAlgorithm.ecies_nistp256){
		throw new IllegalArgumentException("Unsupported encryption public key algorithm: " + publicKeyAlgorithm);
	}
	byte[] keyData = symmetricKey.getEncoded();
	
	IESCipher eCIESCipher = new IEEE1609Dot2ECIES();
	eCIESCipher.engineInit(Cipher.ENCRYPT_MODE, encryptionKey,  new IESParameterSpec(null, null, 128,-1, null, true),secureRandom);
			
	byte[] encryptedData = eCIESCipher.engineDoFinal(keyData, 0, keyData.length);
	
	byte[] v = new byte[ECIES_NIST_P256_V_LENGTH_VER2];
	System.arraycopy(encryptedData, 0, v, 0,ECIES_NIST_P256_V_LENGTH_VER2);
       
       EccPoint p = new EccPoint(publicKeyAlgorithm);
       p.decode(new DataInputStream(new ByteArrayInputStream(v)));
       
	byte[] c = new byte[publicKeyAlgorithm.getRelatedSymmetricAlgorithm().getKeyLength()];
	byte[] t = new byte[EciesNistP256EncryptedKey.VER2_OUTPUT_TAG_LENGTH];
	System.arraycopy(encryptedData, ECIES_NIST_P256_V_LENGTH_VER2, c, 0, publicKeyAlgorithm.getRelatedSymmetricAlgorithm().getKeyLength());
	System.arraycopy(encryptedData, ECIES_NIST_P256_V_LENGTH_VER2 + publicKeyAlgorithm.getRelatedSymmetricAlgorithm().getKeyLength(), t, 0, EciesNistP256EncryptedKey.VER2_OUTPUT_TAG_LENGTH);
	
	return new EciesNistP256EncryptedKey(SecuredMessage.PROTOCOL_VERSION_2,publicKeyAlgorithm, p, c,t); 
}
 
开发者ID:pvendil,项目名称:c2c-common,代码行数:41,代码来源:DefaultCryptoManager.java

示例6: ieeeEceisEncryptSymmetricKey

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
/**
 * Help method to perform a ECIES encryption to a recipient of a symmetric key. 
 * 
 * @param publicKeyAlgorithm the algorithm used.
 * @param encryptionKey the public encryption key of the recipient
 * @param symmetricKey the symmetric key to encrypt
 * @return a EciesNistP256EncryptedKey to be included in a SecureMessage header.
 * 
 * @throws InvalidKeyException if supplied key was corrupt.
 * @throws InvalidAlgorithmParameterException if algorithm was badly specified.
 * @throws IllegalBlockSizeException if encrypted data was corrupt.
 * @throws BadPaddingException if encrypted data was corrupt.
 * @throws IllegalArgumentException if arguments where invalid or algorithm not supported.
 * @throws InvalidKeySpecException if supplied key specification was faulty.
 * @throws IOException if communication problem occurred with underlying systems.
 */
@Override
public EncryptedDataEncryptionKey ieeeEceisEncryptSymmetricKey(EncryptedDataEncryptionKeyChoices keyType, PublicKey encryptionKey, SecretKey symmetricKey, AlgorithmIndicator alg,byte[] eciesDeviation) throws IllegalArgumentException, GeneralSecurityException, IOException{
	byte[] keyData = symmetricKey.getEncoded();

	IESCipher eCIESCipher = new IEEE1609Dot2ECIES();
	eCIESCipher.engineInit(Cipher.ENCRYPT_MODE, encryptionKey, new IESParameterSpec(eciesDeviation, null, 128,-1, null, true),secureRandom);
			
	byte[] encryptedData = eCIESCipher.engineDoFinal(keyData, 0, keyData.length);
	byte[] v = new byte[keyType.getVLength()];
	System.arraycopy(encryptedData, 0, v, 0,keyType.getVLength());
       
	EccP256CurvePoint p = new EccP256CurvePoint(v);
       //p.decode(new DataInputStream(new ByteArrayInputStream(v)));
       
	byte[] c = new byte[alg.getAlgorithm().getSymmetric().getKeyLength()];
	byte[] t = new byte[keyType.getOutputTagLength()];
	System.arraycopy(encryptedData, keyType.getVLength(), c, 0, alg.getAlgorithm().getSymmetric().getKeyLength());
	System.arraycopy(encryptedData, keyType.getVLength() + alg.getAlgorithm().getSymmetric().getKeyLength(), t, 0, keyType.getOutputTagLength());
	
	EciesP256EncryptedKey key = new EciesP256EncryptedKey(p,c,t);
	return new EncryptedDataEncryptionKey(keyType, key);
	 
}
 
开发者ID:pvendil,项目名称:c2c-common,代码行数:40,代码来源:DefaultCryptoManager.java

示例7: itsEceisDecryptSymmetricKeyVer1

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
/**
 * Help method to perform a ECIES decryption of a symmetric key using the ITS protocol version 1 specification. 
 * 
 * @param eciesNistP256EncryptedKey the EciesNistP256EncryptedKey header value from the SecuredMessage
 * @param decryptionKey the receiptients private key
 * @return a decrypted symmetric key.
 * 
 * @throws InvalidKeyException if supplied key was corrupt.
 * @throws InvalidAlgorithmParameterException if algorithm was badly specified.
 * @throws IllegalBlockSizeException if encrypted data was corrupt.
 * @throws BadPaddingException if encrypted data was corrupt.
 * @throws IllegalArgumentException if arguments where invalid or algorithm not supported.
 * @throws InvalidKeySpecException if supplied key specification was faulty.
 * @throws IOException if communication problem occurred with underlying systems.
 */
protected Key itsEceisDecryptSymmetricKeyVer1(EciesNistP256EncryptedKey eciesNistP256EncryptedKey, PrivateKey decryptionKey) throws InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, IllegalArgumentException, InvalidKeySpecException, IOException{
	if(eciesNistP256EncryptedKey.getPublicKeyAlgorithm() != PublicKeyAlgorithm.ecies_nistp256){
		throw new IllegalArgumentException("Unsupported encryption public key algorithm: " + eciesNistP256EncryptedKey.getPublicKeyAlgorithm() );
	}
	
	IESCipher eCIESCipher = new ECIES();
	eCIESCipher.engineInit(Cipher.DECRYPT_MODE, decryptionKey, new IESParameterSpec(null, null, 128),secureRandom);
			
	byte[] encryptedData = new byte[ECIES_NIST_P256_V_LENGTH_VER1 + eciesNistP256EncryptedKey.getPublicKeyAlgorithm().getRelatedSymmetricAlgorithm().getKeyLength() + EciesNistP256EncryptedKey.VER1_OUTPUT_TAG_LENGTH];
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	DataOutputStream dis = new DataOutputStream(baos);
	
	eciesNistP256EncryptedKey.getV().encode(dis);
	baos.close();
	System.arraycopy(baos.toByteArray(), 0, encryptedData, 0, ECIES_NIST_P256_V_LENGTH_VER1);
	System.arraycopy(eciesNistP256EncryptedKey.getC(), 0, encryptedData, ECIES_NIST_P256_V_LENGTH_VER1, eciesNistP256EncryptedKey.getPublicKeyAlgorithm().getRelatedSymmetricAlgorithm().getKeyLength());
	System.arraycopy(eciesNistP256EncryptedKey.getT(), 0, encryptedData, ECIES_NIST_P256_V_LENGTH_VER1+eciesNistP256EncryptedKey.getPublicKeyAlgorithm().getRelatedSymmetricAlgorithm().getKeyLength(), EciesNistP256EncryptedKey.VER1_OUTPUT_TAG_LENGTH);
	
	
	
	byte[] decryptedData = eCIESCipher.engineDoFinal(encryptedData, 0, encryptedData.length);

	return new SecretKeySpec(decryptedData, "AES");
}
 
开发者ID:pvendil,项目名称:c2c-common,代码行数:40,代码来源:DefaultCryptoManager.java

示例8: itsEciesDecryptSymmetricKeyVer2

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
/**
 * Help method to perform a ECIES decryption of a symmetric key using the ITS protocol version 2 specification. 
 * 
 * @param eciesNistP256EncryptedKey the EciesNistP256EncryptedKey header value from the SecuredMessage
 * @param decryptionKey the receiptients private key
 * @return a decrypted symmetric key.
 * 
 * @throws InvalidKeyException if supplied key was corrupt.
 * @throws InvalidAlgorithmParameterException if algorithm was badly specified.
 * @throws IllegalBlockSizeException if encrypted data was corrupt.
 * @throws BadPaddingException if encrypted data was corrupt.
 * @throws IllegalArgumentException if arguments where invalid or algorithm not supported.
 * @throws InvalidKeySpecException if supplied key specification was faulty.
 * @throws IOException if communication problem occurred with underlying systems.
 */
protected Key itsEciesDecryptSymmetricKeyVer2(EciesNistP256EncryptedKey eciesNistP256EncryptedKey, PrivateKey decryptionKey) throws InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, IllegalArgumentException, InvalidKeySpecException, IOException{
	if(eciesNistP256EncryptedKey.getPublicKeyAlgorithm() != PublicKeyAlgorithm.ecies_nistp256){
		throw new IllegalArgumentException("Unsupported encryption public key algorithm: " + eciesNistP256EncryptedKey.getPublicKeyAlgorithm() );
	}
	
	IESCipher eCIESCipher = new IEEE1609Dot2ECIES();
	eCIESCipher.engineInit(Cipher.DECRYPT_MODE, decryptionKey, new IESParameterSpec(null, null, 128,-1, null, true),secureRandom);
			
	byte[] encryptedData = new byte[ECIES_NIST_P256_V_LENGTH_VER2 + eciesNistP256EncryptedKey.getPublicKeyAlgorithm().getRelatedSymmetricAlgorithm().getKeyLength() + EciesNistP256EncryptedKey.VER2_OUTPUT_TAG_LENGTH];
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	DataOutputStream dis = new DataOutputStream(baos);
	
	eciesNistP256EncryptedKey.getV().encode(dis);
	baos.close();
	System.arraycopy(baos.toByteArray(), 0, encryptedData, 0, ECIES_NIST_P256_V_LENGTH_VER2);
	System.arraycopy(eciesNistP256EncryptedKey.getC(), 0, encryptedData, ECIES_NIST_P256_V_LENGTH_VER2, eciesNistP256EncryptedKey.getPublicKeyAlgorithm().getRelatedSymmetricAlgorithm().getKeyLength());
	System.arraycopy(eciesNistP256EncryptedKey.getT(), 0, encryptedData, ECIES_NIST_P256_V_LENGTH_VER2+eciesNistP256EncryptedKey.getPublicKeyAlgorithm().getRelatedSymmetricAlgorithm().getKeyLength(), EciesNistP256EncryptedKey.VER2_OUTPUT_TAG_LENGTH);
	
	
	
	byte[] decryptedData = eCIESCipher.engineDoFinal(encryptedData, 0, encryptedData.length);

	return new SecretKeySpec(decryptedData, "AES");
}
 
开发者ID:pvendil,项目名称:c2c-common,代码行数:40,代码来源:DefaultCryptoManager.java

示例9: ieeeECEISDecryptSymmetricKey

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
/**
 * Help method to perform a ECIES decryption of a symmetric key. 
 * 
 * @param encryptedDataEncryptionKey the EncryptedDataEncryptionKey to decrypt
 * @param decryptionKey the receiptients private key
 * @param alg the related algorithm to use
 * @param eciesDeviation to use as P1 parameter.
 * @return a decrypted symmetric key.
 * 
 * @throws IllegalArgumentException if arguments where invalid or algorithm not supported.
 * @throws GeneralSecurityException if internal problems occurred decrypting key.
 * @throws IOException if communication problem occurred with underlying systems.
 */
@Override
public SecretKey ieeeECEISDecryptSymmetricKey(EncryptedDataEncryptionKey encryptedDataEncryptionKey, PrivateKey decryptionKey, AlgorithmIndicator alg, byte[] eciesDeviation) throws IllegalArgumentException, GeneralSecurityException, IOException{
	try{
		EncryptedDataEncryptionKeyChoices keyType = encryptedDataEncryptionKey.getType();
		IESCipher eCIESCipher = new IEEE1609Dot2ECIES();
		eCIESCipher.engineInit(Cipher.DECRYPT_MODE, decryptionKey, new IESParameterSpec(eciesDeviation, null, 128,-1, null, true),secureRandom);

		byte[] encryptedData = new byte[keyType.getVLength() + alg.getAlgorithm().getSymmetric().getKeyLength() + keyType.getOutputTagLength()];


		EciesP256EncryptedKey eciesP256EncryptedKey = (EciesP256EncryptedKey) encryptedDataEncryptionKey.getValue();
		ECPublicKey pubKey = (ECPublicKey) decodeEccPoint(alg, eciesP256EncryptedKey.getV());
		BCECPublicKey bcPubKey = convertECPublicKeyToBCECPublicKey(alg, pubKey);

		System.arraycopy(bcPubKey.getQ().getEncoded(true), 0, encryptedData, 0, keyType.getVLength());
		System.arraycopy(eciesP256EncryptedKey.getC(), 0, encryptedData, keyType.getVLength(), alg.getAlgorithm().getSymmetric().getKeyLength());
		System.arraycopy(eciesP256EncryptedKey.getT(), 0, encryptedData, keyType.getVLength()+alg.getAlgorithm().getSymmetric().getKeyLength(), keyType.getOutputTagLength());

		byte[] decryptedData = eCIESCipher.engineDoFinal(encryptedData, 0, encryptedData.length);
		return new SecretKeySpec(decryptedData, "AES");
	}catch(BadPaddingException e){
		throw new InvalidKeyException("Error decrypting symmetric key using supplied private key: " + e.getMessage(), e);
	}
}
 
开发者ID:pvendil,项目名称:c2c-common,代码行数:38,代码来源:DefaultCryptoManager.java

示例10: localEngineGetParameterSpec

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
protected AlgorithmParameterSpec localEngineGetParameterSpec(
    Class paramSpec)
    throws InvalidParameterSpecException
{
    if (paramSpec == IESParameterSpec.class)
    {
        return currentSpec;
    }

    throw new InvalidParameterSpecException("unknown parameter spec passed to ElGamal parameters object.");
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:12,代码来源:AlgorithmParametersSpi.java

示例11: engineInit

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
protected void engineInit(
    AlgorithmParameterSpec paramSpec)
    throws InvalidParameterSpecException
{
    if (!(paramSpec instanceof IESParameterSpec))
    {
        throw new InvalidParameterSpecException("IESParameterSpec required to initialise a IES algorithm parameters object");
    }

    this.currentSpec = (IESParameterSpec)paramSpec;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:12,代码来源:AlgorithmParametersSpi.java

示例12: guessParameterSpec

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
public static IESParameterSpec guessParameterSpec(BufferedBlockCipher iesBlockCipher)
{
    if (iesBlockCipher == null)
    {
        return new IESParameterSpec(null, null, 128);
    }
    else
    {
        BlockCipher underlyingCipher = iesBlockCipher.getUnderlyingCipher();

        if (underlyingCipher.getAlgorithmName().equals("DES") ||
            underlyingCipher.getAlgorithmName().equals("RC2") ||
            underlyingCipher.getAlgorithmName().equals("RC5-32") ||
            underlyingCipher.getAlgorithmName().equals("RC5-64"))
        {
            return new IESParameterSpec(null, null, 64, 64);
        }
        else if (underlyingCipher.getAlgorithmName().equals("SKIPJACK"))
        {
            return new IESParameterSpec(null, null, 80, 80);
        }
        else if (underlyingCipher.getAlgorithmName().equals("GOST28147"))
        {
            return new IESParameterSpec(null, null, 256, 256);
        }

        return new IESParameterSpec(null, null, 128, 128);
    }
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:30,代码来源:IESUtil.java

示例13: localEngineGetParameterSpec

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
protected AlgorithmParameterSpec localEngineGetParameterSpec(
    Class paramSpec)
    throws InvalidParameterSpecException
{
    if (paramSpec == IESParameterSpec.class || paramSpec == AlgorithmParameterSpec.class)
    {
        return currentSpec;
    }

    throw new InvalidParameterSpecException("unknown parameter spec passed to ElGamal parameters object.");
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:12,代码来源:AlgorithmParametersSpi.java

示例14: localEngineGetParameterSpec

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
protected AlgorithmParameterSpec localEngineGetParameterSpec(
    Class paramSpec) 
    throws InvalidParameterSpecException
{
    if (paramSpec == IESParameterSpec.class)
    {
        return currentSpec;
    }

    throw new InvalidParameterSpecException("unknown parameter spec passed to ElGamal parameters object.");
}
 
开发者ID:credentials,项目名称:irma_future_id,代码行数:12,代码来源:JDKAlgorithmParameters.java

示例15: engineInit

import org.bouncycastle.jce.spec.IESParameterSpec; //导入依赖的package包/类
protected void engineInit(
    AlgorithmParameterSpec paramSpec) 
    throws InvalidParameterSpecException
{
    if (!(paramSpec instanceof IESParameterSpec))
    {
        throw new InvalidParameterSpecException("IESParameterSpec required to initialise a IES algorithm parameters object");
    }

    this.currentSpec = (IESParameterSpec)paramSpec;
}
 
开发者ID:credentials,项目名称:irma_future_id,代码行数:12,代码来源:JDKAlgorithmParameters.java


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