Discuss this help topic in SecureBlackbox Forum

TElPGPWriter.EncryptAndSign

TElPGPWriter     See also     


Filter: C#/Java  VB.NET  Pascal  C++  PHP  


Encrypts and signs the ASourceStream stream.

Declaration

[C#/Java]
    void EncryptAndSign(System.IO.Stream ASourceStream, System.IO.Stream ADestStream, long Count);

[VB.NET]
    Sub EncryptAndSign(ByVal ASourceStream As System.IO.Stream, ByVal ADestStream As System.IO.Stream, ByVal Count As Long)

[Pascal]
    procedure EncryptAndSign(ASourceStream, ADestStream : TStream; Count : integer = 0);

[C++]
    void EncryptAndSign(TStream &ASourceStream, TStream &ADestStream, int64_t Count);
    void EncryptAndSign(TStream *ASourceStream, TStream *ADestStream, int64_t Count);

[PHP]
    void EncryptAndSign(TStream $ASourceStream, TStream $ADestStream, integer $Count)

Parameters

  • ASourceStream - stream to be encrypted and signed.
  • ADestStream - resulting stream.
  • InFile - file to be encrypted.
  • OutFile - resulting file.
  • Count - the number of bytes to be read from ASourceStream. If this parameter is 0data is read till the end of the stream.
    Default value is 0.

Description

    This method encrypts and signs data from ASourceStream and returns result at ADestStream parameter.
    Use Count parameter to read specified number of bytes from ASourceStream. Set this parameter value to 0 in order to read all data till the stream end.
    Depending on Compress and Armor properties values data can be compressed before encryption and signing and armored (wrapped into base64 envelope) after that.

[Pascal]
    Note, in Delphi versions older than 7, works only with streams of sizes smaller than 2GB (because of TStream limitation). Use EncryptAndSignFile instead.

See also:     Armor     SymmetricKeyAlgorithm     Encrypt     EncryptAndSignFile     EncryptAndSignFiles     Sign    

Discuss this help topic in SecureBlackbox Forum