Esempio n. 1
0
        public static SubSelect GetSubData(byte[] data, HandshakeResponse handresponse)
        {
            SubSelect subdata = new SubSelect();

            if (!VerificationTools.HashCheck(data.ToList()))
            {
                return(null);
            }
            var decr = Cryptogram.Decrypt(data, handresponse);

            return(AnalysisSubSelect(decr));
        }
Esempio n. 2
0
            public static void WriteEncrypt(string path, string content, EncryptType encrypt = EncryptType.AES)
            {
                try
                {
                    byte[] buffer = Encoding.Default.GetBytes(Cryptogram.Decrypt(content, encrypt));

                    CreateDirectory(Path.GetDirectoryName(path));

                    File.WriteAllBytes(path, buffer);
                }
                catch (Exception e)
                {
                    Debuger.LogException(Author.File, e);
                }
            }