public void EncodeText(string text)
 {
     if (!string.IsNullOrEmpty(text))
     {
         Text   = text;
         Binary = TranslatorHelper.TextToBinary(text);
         Hex    = TranslatorHelper.TextToHexidecimal(text);
         ASCII  = TranslatorHelper.TextToASCII(text);
         Base64 = TranslatorHelper.TextToBase64(text);
         MD5    = TranslatorHelper.TextToCrypto(text, CryptoType.MD5);
         SHA1   = TranslatorHelper.TextToCrypto(text, CryptoType.SHA1);
     }
 }
Пример #2
0
        public bool EncodeText(string text)
        {
            if (!string.IsNullOrEmpty(text))
            {
                Text        = text;
                Binary      = TranslatorHelper.TextToBinary(text);
                Hexadecimal = TranslatorHelper.TextToHexadecimal(text);
                ASCII       = TranslatorHelper.TextToASCII(text);
                Base64      = TranslatorHelper.TextToBase64(text);
                MD5         = TranslatorHelper.TextToHash(text, HashType.MD5, true);
                SHA1        = TranslatorHelper.TextToHash(text, HashType.SHA1, true);
                SHA256      = TranslatorHelper.TextToHash(text, HashType.SHA256, true);
                SHA384      = TranslatorHelper.TextToHash(text, HashType.SHA384, true);
                SHA512      = TranslatorHelper.TextToHash(text, HashType.SHA512, true);
                RIPEMD160   = TranslatorHelper.TextToHash(text, HashType.RIPEMD160, true);
                return(true);
            }

            return(false);
        }