12. september 2004 - 11:20Der er
17 kommentarer og 1 løsning
+ i url
jeg har en krypteringsmetode som når jeg krypterer tallet 2 får en streng som bla indeholder tegnet +. Den krypterede streng står i url: test.aspx?id=e+ofKofcsBI=
men når jeg henter parameteren id så forsvinder +: string id = Request.QueryString["id"]);
id er nu = "e ofKofcsBI=". Hvordan får jeg + med? (jeg har leget med Server.Encode/Decode, men det virker ikke umiddelbart
jeg er ikke ligefrem 100 meter mester i kryptering, men de "inbyggede" algoritmer MD5 og SHA1 - jeg mener ikke de kan resultere i den slags karakterer...
public ConfigurationPasswordGenerator() { InitializeComponent(); }
/// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); }
#region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.label1 = new System.Windows.Forms.Label(); this.txtPass = new System.Windows.Forms.TextBox(); this.txtHashedPass = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.ccAlgorithme = new System.Windows.Forms.ComboBox(); this.SuspendLayout(); // // label1 // this.label1.Location = new System.Drawing.Point(8, 8); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(120, 23); this.label1.TabIndex = 0; this.label1.Text = "Indtast adgangskode"; // // txtPass // this.txtPass.Location = new System.Drawing.Point(8, 32); this.txtPass.Name = "txtPass"; this.txtPass.Size = new System.Drawing.Size(200, 20); this.txtPass.TabIndex = 1; this.txtPass.Text = ""; this.txtPass.TextChanged += new System.EventHandler(this.txtPass_TextChanged); // // txtHashedPass // this.txtHashedPass.Location = new System.Drawing.Point(8, 61); this.txtHashedPass.Name = "txtHashedPass"; this.txtHashedPass.ReadOnly = true; this.txtHashedPass.Size = new System.Drawing.Size(288, 20); this.txtHashedPass.TabIndex = 3; this.txtHashedPass.Text = ""; // // label2 // this.label2.Location = new System.Drawing.Point(216, 8); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(80, 23); this.label2.TabIndex = 4; this.label2.Text = "Vælg algoritme"; // // ccAlgorithme // this.ccAlgorithme.Items.AddRange(new object[] {"SHA1","MD5"}); this.ccAlgorithme.Location = new System.Drawing.Point(216, 32); this.ccAlgorithme.Name = "ccAlgorithme"; this.ccAlgorithme.Size = new System.Drawing.Size(80, 21); this.ccAlgorithme.TabIndex = 5; this.ccAlgorithme.SelectedIndex = 0; this.ccAlgorithme.SelectedIndexChanged += new System.EventHandler(this.ccAlgorithme_SelectedIndexChanged); // // ConfigurationPasswordGenerator // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(304, 93); this.Controls.Add(this.ccAlgorithme); this.Controls.Add(this.label2); this.Controls.Add(this.txtHashedPass); this.Controls.Add(this.txtPass); this.Controls.Add(this.label1); this.Name = "ConfigurationPasswordGenerator"; this.Text = "ConfigurationPasswordGenerator"; this.ResumeLayout(false);
} #endregion
/// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.Run(new ConfigurationPasswordGenerator()); }
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.