Encrypts given String in ASCII format.
Namespace: DidiSoft.PgpAssembly: DidiSoft.Pgp (in DidiSoft.Pgp.dll) Version: 1.7.3.35547
Syntax
| C# |
|---|
public string EncryptString( string stringToEncrypt, KeyStore keyStore, long keyId ) |
| Visual Basic |
|---|
Public Function EncryptString ( _ stringToEncrypt As String, _ keyStore As KeyStore, _ keyId As Long _ ) As String |
| Visual C++ |
|---|
public: String^ EncryptString( String^ stringToEncrypt, KeyStore^ keyStore, long long keyId ) |
Parameters
- stringToEncrypt
- Type: System..::..String
plain text string to be encrypted
- keyStore
- Type: DidiSoft.Pgp..::..KeyStore
KeyStore holding the encryption key
- keyId
- Type: System..::..Int64
Encryption key Id
Return Value
the encrypted string
Remarks
Compression algorithm used is the one specified through Compression
Symmetric cipher algorithm used is the one specified through Cypher
Symmetric cipher algorithm used is the one specified through Cypher
Exceptions
| Exception | Condition |
|---|---|
| DidiSoft.Pgp.Exceptions..::..WrongPublicKeyException | If the supplied public key is not usable |
| DidiSoft.Pgp..::..PGPException | General encryption error |
| System.IO..::..IOException | I/O error |