C# Class SSIS.Extensions.PGPTask.PGPEncryptDecrypt

显示文件 Open project: ElanHasson/SSIS-Extensions

Public Methods

Method Description
Decrypt ( Stream inputStream, Stream privateKeyStream, string passPhrase, string outputFile ) : void
Decrypt ( string inputfile, string privateKeyFile, string passPhrase, string outputFile ) : void

Decrypts the specified inputfile.

EncryptAndSign ( string inputFile, string outputFile, string publicKeyFile, string privateKeyFile, string passPhrase, bool armor ) : void

Encrypt and sign the file pointed to by unencryptedFileInfo.

EncryptFile ( string inputFile, string outputFile, string publicKeyFile, bool armor, bool withIntegrityCheck ) : void

Encrypts the file.

Private Methods

Method Description
ChainCompressedOut ( Stream encryptedOut ) : Stream
ChainEncryptedOut ( Stream outputStream, PgpEncryptionKeys m_encryptionKeys ) : Stream
ChainLiteralOut ( Stream compressedOut, FileInfo file ) : Stream
FindSecretKey ( PgpSecretKeyRingBundle pgpSec, long keyId, char pass ) : PgpPrivateKey

Search a secret key ring collection for a secret key corresponding to keyId if it exists.

InitSignatureGenerator ( Stream compressedOut, PgpEncryptionKeys m_encryptionKeys ) : PgpSignatureGenerator
OutputEncrypted ( string inputFile, Stream outputStream, PgpEncryptionKeys encryptionKeys ) : void

Outputs the encrypted.

ReadPublicKey ( Stream inputStream ) : PgpPublicKey

A simple routine that opens a key ring file and loads the first available key suitable for encryption.

WriteOutputAndSign ( Stream compressedOut, Stream literalOut, FileStream inputFile, PgpSignatureGenerator signatureGenerator ) : void

Writes the output and sign.

Method Details

Decrypt() public static method

public static Decrypt ( Stream inputStream, Stream privateKeyStream, string passPhrase, string outputFile ) : void
inputStream Stream
privateKeyStream Stream
passPhrase string
outputFile string
return void

Decrypt() public static method

Decrypts the specified inputfile.
Invalid Output file path.
public static Decrypt ( string inputfile, string privateKeyFile, string passPhrase, string outputFile ) : void
inputfile string The inputfile.
privateKeyFile string The private key file.
passPhrase string The pass phrase.
outputFile string The output file.
return void

EncryptAndSign() public static method

Encrypt and sign the file pointed to by unencryptedFileInfo.
/// Invalid Pass Phrase. /// or /// Encryption Key not found.
public static EncryptAndSign ( string inputFile, string outputFile, string publicKeyFile, string privateKeyFile, string passPhrase, bool armor ) : void
inputFile string The input file.
outputFile string The output file.
publicKeyFile string The public key file.
privateKeyFile string The private key file.
passPhrase string The pass phrase.
armor bool if set to true [armor].
return void

EncryptFile() public static method

Encrypts the file.
public static EncryptFile ( string inputFile, string outputFile, string publicKeyFile, bool armor, bool withIntegrityCheck ) : void
inputFile string The input file.
outputFile string The output file.
publicKeyFile string The public key file.
armor bool if set to true [armor].
withIntegrityCheck bool if set to true [with integrity check].
return void