A simple way to encrypt data for communication with Travelhub.
Flytour Tools Cryptography is available for download and installation as NuGet packages.
To build Flytour Tools Cryptography from sources, you will need:
var pem = @"-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxIRs8RmdAKypl9tKhrty
rjwYn1hsVebAHkZjPiSwRBTZF7uLzotYPRgKFiV8sUo6RKvNT9wab+NE0LnyC/wz
132Q5cQrxkeNey8r+1Q3QaGSRXLifvn8BSrgATJm+VbMTMGTTtMc5XLbrH9natbd
POxDgJIy31+0Oets8/+EQPKNT/CeicfmuSlI+jo5Jcds8rpOURLEW9dcTY69TLpv
YhjCYlT68pGLf/zrMFgbp2T4ax9iI1YBZA2MTkLC323b2VB8kYu1lN2pn3mvQFH/
n2eahmSciHaOvs4fIqNlcyNi0tjRZC4++ejdW2Qsy5+j1DxOURY7KmvicqpVYw21
0QIDAQAB
-----END PUBLIC KEY-----";
var hash = AsymmetricProvider.Encrypt("value", pem);
var pem = File.ReadAllText(@$"{Directory.GetCurrentDirectory()}\public.pem");
txtHash.Text = AsymmetricProvider.Encrypt(txtHash.Text, pem);