PGP Encrypts given String in OpenPGP ASCII armored format.
Namespace: DidiSoft.PgpAssembly: DidiSoft.Pgp (in DidiSoft.Pgp.dll) Version: 1.7.3.35547
Syntax
| C# |
|---|
public string EncryptString( string stringToEncrypt, string publicKeyAscii ) |
| Visual Basic |
|---|
Public Function EncryptString ( _ stringToEncrypt As String, _ publicKeyAscii As String _ ) As String |
| Visual C++ |
|---|
public: String^ EncryptString( String^ stringToEncrypt, String^ publicKeyAscii ) |
Parameters
- stringToEncrypt
- Type: System..::..String
String to be encrypted
- publicKeyAscii
- Type: System..::..String
Public key as String in ASCII armored format
Return Value
stringToEncrypt OpenPGP encrypted
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 |