public static string EncryptJson(this IJObjectCrypto jObjectCrypto, string json, byte[] publicKey) { var jObject = JObjectTools.GetJObject(json); jObjectCrypto.Encrypt(jObject, publicKey); return(JObjectTools.GetJson(jObject)); }
public static string Decrypt(this IJObjectCrypto jObjectCrypto, Stream stream, byte[] privateKey) { var jObject = JObjectTools.GetJObject(stream); jObjectCrypto.Decrypt(jObject, privateKey); return(JObjectTools.GetJson(jObject)); }