Exemple #1
0
        public static string EncryptJson(this IJObjectCrypto jObjectCrypto, string json, byte[] publicKey)
        {
            var jObject = JObjectTools.GetJObject(json);

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

            jObjectCrypto.Decrypt(jObject, privateKey);
            return(JObjectTools.GetJson(jObject));
        }