'Is there a C# equivalent of Java's BouncyCastleStore?

I have a password protected Bouncy Castle key store file created with Bouncy Castle Java API, and I can read key from that store using following Java code:

BouncyCastleStore uberStore = new BouncyCastleStore();
char[] uberStorePassword = props.getProperty("keystore.pwd").toCharArray();
FileInputStream finUberStore = new FileInputStream(props.getProperty("keystore.path"));
uberStore.engineLoad(finUberStore, uberStorePassword);
KeyStore.PasswordProtection keystorePassProt = new KeyStore.PasswordProtection(uberStorePassword);
SecretKey aesKey = ((KeyStore.SecretKeyEntry) uberStore.engineGetEntry(props.getProperty("keystore.alias"), keystorePassProt)).getSecretKey();

On the other hand, I have an application in C#, where I have to do some AES-EAX encryption using key stored in the Bouncy Castle key store.

While most of the classes in Bouncy Castle Java cryptography API have their equivalent in Bouncy Castle C# API, I couldn’t find any class in Bouncy Castle C# API that resembles BouncyCastleStore. Therefore I was not able to extract key from the Bouncy Castle key store file via C#. Is it possible to read this key store using c#?

Edit: I’ve rephrased my inital question because it was somehow misleading (thanks to @cryptic_star). My goal is not to make exact translation of sampled Java code, but to find whatever possible way to extract key from Bouncy Castle key store using C#.



Solution 1:[1]

BouncyCastle on C# can only read PKCS12 files or PEM (Base64 coded) files. Currently I don't see a way to read jks.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rainer Knöterich