Java 类org.bouncycastle.openpgp.operator.PBEDataDecryptorFactory 实例源码

项目:jpgpj    文件:Decryptor.java   
/**
 * Builds a symmetric-key decryptor for the specified passphrase.
 */
protected PBEDataDecryptorFactory buildSymmetricKeyDecryptor(
String passphrase) {
    char[] chars = !Util.isEmpty(passphrase) ?
        passphrase.toCharArray() : new char[0];
    return new BcPBEDataDecryptorFactory(chars,
        new BcPGPDigestCalculatorProvider());
}
项目:gwt-crypto    文件:PGPPBEEncryptedData.java   
/**
 * Return the symmetric key algorithm required to decrypt the data protected by this object.
 *
 * @param dataDecryptorFactory   decryptor factory to use to recover the session data.
 * @return  the integer encryption algorithm code.
 * @throws PGPException if the session data cannot be recovered.
 */
public int getSymmetricAlgorithm(
    PBEDataDecryptorFactory dataDecryptorFactory)
    throws PGPException
{
    byte[]       key = dataDecryptorFactory.makeKeyFromPassPhrase(keyData.getEncAlgorithm(), keyData.getS2K());
    byte[]       sessionData = dataDecryptorFactory.recoverSessionData(keyData.getEncAlgorithm(), key, keyData.getSecKeyData());

    return sessionData[0];
}
项目:CryptMeme    文件:PGPPBEEncryptedData.java   
/**
 * Return the symmetric key algorithm required to decrypt the data protected by this object.
 *
 * @param dataDecryptorFactory   decryptor factory to use to recover the session data.
 * @return  the integer encryption algorithm code.
 * @throws PGPException if the session data cannot be recovered.
 */
public int getSymmetricAlgorithm(
    PBEDataDecryptorFactory dataDecryptorFactory)
    throws PGPException
{
    byte[]       key = dataDecryptorFactory.makeKeyFromPassPhrase(keyData.getEncAlgorithm(), keyData.getS2K());
    byte[]       sessionData = dataDecryptorFactory.recoverSessionData(keyData.getEncAlgorithm(), key, keyData.getSecKeyData());

    return sessionData[0];
}
项目:irma_future_id    文件:PGPPBEEncryptedData.java   
/**
 * Return the symmetric key algorithm required to decrypt the data protected by this object.
 *
 * @param dataDecryptorFactory   decryptor factory to use to recover the session data.
 * @return  the integer encryption algorithm code.
 * @throws PGPException if the session data cannot be recovered.
 */
public int getSymmetricAlgorithm(
    PBEDataDecryptorFactory dataDecryptorFactory)
    throws PGPException
{
    byte[]       key = dataDecryptorFactory.makeKeyFromPassPhrase(keyData.getEncAlgorithm(), keyData.getS2K());
    byte[]       sessionData = dataDecryptorFactory.recoverSessionData(keyData.getEncAlgorithm(), key, keyData.getSecKeyData());

    return sessionData[0];
}
项目:irma_future_id    文件:PGPPBEEncryptedData.java   
/**
 * Return the symmetric key algorithm required to decrypt the data protected by this object.
 *
 * @param dataDecryptorFactory   decryptor factory to use to recover the session data.
 * @return  the integer encryption algorithm code.
 * @throws PGPException if the session data cannot be recovered.
 */
public int getSymmetricAlgorithm(
    PBEDataDecryptorFactory dataDecryptorFactory)
    throws PGPException
{
    byte[]       key = dataDecryptorFactory.makeKeyFromPassPhrase(keyData.getEncAlgorithm(), keyData.getS2K());
    byte[]       sessionData = dataDecryptorFactory.recoverSessionData(keyData.getEncAlgorithm(), key, keyData.getSecKeyData());

    return sessionData[0];
}
项目:bc-java    文件:PGPPBEEncryptedData.java   
/**
 * Return the symmetric key algorithm required to decrypt the data protected by this object.
 *
 * @param dataDecryptorFactory   decryptor factory to use to recover the session data.
 * @return  the integer encryption algorithm code.
 * @throws PGPException if the session data cannot be recovered.
 */
public int getSymmetricAlgorithm(
    PBEDataDecryptorFactory dataDecryptorFactory)
    throws PGPException
{
    byte[]       key = dataDecryptorFactory.makeKeyFromPassPhrase(keyData.getEncAlgorithm(), keyData.getS2K());
    byte[]       sessionData = dataDecryptorFactory.recoverSessionData(keyData.getEncAlgorithm(), key, keyData.getSecKeyData());

    return sessionData[0];
}
项目:bc-java    文件:PGPPBEEncryptedData.java   
/**
 * Return the symmetric key algorithm required to decrypt the data protected by this object.
 *
 * @param dataDecryptorFactory   decryptor factory to use to recover the session data.
 * @return  the integer encryption algorithm code.
 * @throws PGPException if the session data cannot be recovered.
 */
public int getSymmetricAlgorithm(
    PBEDataDecryptorFactory dataDecryptorFactory)
    throws PGPException
{
    byte[]       key = dataDecryptorFactory.makeKeyFromPassPhrase(keyData.getEncAlgorithm(), keyData.getS2K());
    byte[]       sessionData = dataDecryptorFactory.recoverSessionData(keyData.getEncAlgorithm(), key, keyData.getSecKeyData());

    return sessionData[0];
}