示例#1
0
 private void Encrypt_Click(object sender, EventArgs e)
 {
     EncryptKeyOut.Text   = Jformat(HttpUtility.UrlEncode(CryptoPrefsCreater.WrapKey(EncryptKeyIn.Text)));
     EncryptValueOut.Text = Jformat(HttpUtility.UrlEncode(CryptoPrefsCreater.GetValueFromKey(EncryptKeyIn.Text, EncryptValueIn.Text)));
     FullTextEnc.Text     = "<string name=\"" + EncryptKeyOut.Text + "\">" + EncryptValueOut.Text + "</string>";
 }
示例#2
0
 internal static string WrapKey(string key)
 {
     byte[] bytes = CryptoPrefsCreater.s_defaultEncoding.GetBytes(key);
     return(CryptoPrefsCreater.WrapKey(bytes));
 }