Exemple #1
0
        private ICipherEncode GetAesCipherEncode()
        {
            ICipherEncode encode = null;

            if (radio_aes_cipher_encode_base58.Checked)
            {
                encode = new Base58CipherEncode();
            }
            if (radio_aes_cipher_encode_base64.Checked)
            {
                encode = new Base64CipherEncode();
            }
            if (radio_aes_cipher_encode_hex.Checked)
            {
                encode = new HexCipherEncode();
            }
            return(encode);
        }
        private ICipherEncode GetDesCipherEncode()
        {
            string        cipherMode = cbox_des_cipher_encode.SelectedItem.ToString().ToLower();
            ICipherEncode encode     = null;

            switch (cipherMode)
            {
            case "base64":
                encode = new Base64CipherEncode();
                break;

            case "base58":
                encode = new Base58CipherEncode();
                break;

            case "hex":
                encode = new HexCipherEncode();
                break;
            }
            return(encode);
        }