I have been trying to decrypt the data in C# using : https://gist.github.com/Nexengineer/23589d0e8eeab0ad0f50cffdf4be6bca
This screen shot is Test Decryption snippet from health-information-user-master:
Now i’m using all the literal values in my c# hoping it should work, but its giving me error on below while creating sharedKey and error mainly occurs while converting string to private key
Bellow error occurs in every string private key i try to convert
var sharedKey = GetBase64FromByte(GetSharedSecretValue("DrDDUf+HIXB59/ym4GxrM/TfeULHyiUVzHWkq9rFkJI=", "MIIBMTCB6gYHKoZIzj0CATCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCANCAARfpkcbh0Y6Z1xcck4D2pNKLQ2DwLOxI9bO2sy8zlbJ4391xJpwYNG2STnmP9cwz0+V74B3mbcykl5J1gsXtNe+"));
public AsymmetricKeyParameter GetPrivateKeyFrom(string privateKey)
{
return PrivateKeyFactory.CreateKey((byte[])GetByteFromBase64(privateKey));
}
What could be done ? I’m done with HIP implementation, now HIU implementation is stuck because of this decryption issue.