/// Decrypts the given data using the specified private [key]. public static byte[] decryptBytesWithRsa(byte[] data, PrivateKey key) { RSAcoder coder = new RSAcoder((AsymmetricKeyParameter)((RSAPrivateKey)key).secretKey); return(coder.Decrypt(data)); }