Where would I find documentation on Scribe.Core.ConnectorApi.Cryptography ? We're seeing a variety of Base64 error related to the Decrypor Class and Decrypt_AesManaged method related to grabbing a Password from the "Add a New Connection" Form in Scribe.
Came across this whilst coming up against the same issue. The error thrown by my custom connector was:
Thought I'd post in case anyone else runs into the same issue.
My connector settings class name is "StandardConnectorSettings". To get this to work:
1) Declare the cryptokey in the connector settings class as below:
public const string CryptoKey = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
GUID masked for security. I used a new GUID of registry format.
2) In the form definition you must reference the same Cryptokey:
var form = new FormDefinition
CompanyName = "Scribe Software",
CryptoKey = StandardConnectorSettings.CryptoKey,
HelpUri = new Uri("http://www.scribesoft.com"),
InputType = InputType.Text,
IsRequired = true,
Label = "Email Address",
PropertyName = "EmailAddress"
InputType = InputType.Password,
IsRequired = true,
Label = "Password",
PropertyName = "Password"
3) Ensure your connector class has a using statement for the Scribe cryptography class:
4) In your Connect method, decrypt the password to a declared variable using the following:
// decrypt the password provided from the form definition using the connector Cryptokey
this.password = Decryptor.Decrypt_AesManaged(properties["Password"], StandardConnectorSettings.CryptoKey);
In the SDK examples, the Cryptokey is set to "1" (a string) which needs changing as per Step 2.
Hope this helps. Happy Scribing,
You can view the version by locating the DLL, right-clicking and choosing Properties -> Details. You want to use the same version that comes with an On-Premise Agent. If you have it, then it's probably not an issue.
Please open a ticket so we can check out your project.
Double-check you're using Scribe.Core.ConnectorApi.Cryptography.Decryptor, you're using the latest Scribe.Core.ConnectorApi assembly (from your Agent), and the Cryptokey is declared in one of your classes, not another file (i.e. a config.xml).
If you're still stick, please open a ticket so we can schedule a web session.