I made this program to encrypt any given string, I am getting an error that prevents this from being finished.
Public Class Form1
Dim Holder As string
Dim Pass = "Za029fjao"
Dim Helper As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Holder = TextBox1.Text
Helper = Holder + Holder * Pass
Textbox2.text = Helper
End Sub
End Class
All I want to do is multiply 2 strings (is that possible?). The error says that string cannot be converted into double...
i need a standard way of encrypting a string and decrypting it using AES. I am aware of the Cryptography class, however almost every example creates a class to do the encryption,If .Net already has this implemented and ready to use why would we create classes for encryption and decryption, isn't it as simple as calling the encrypt method of the class or decrpyt and passing in the text. Unless everyone is wanting to centralize the code. But even then i see so many different examples from File,Data Protection etc..
I have a page that has a few text boxes on it and are filled based upon a persons information. Like Name, telephone number, address etc
The data is stored in an Access DB.
I want to add a check box and have a label beside it that if it's checked it shows a hyperlink to a pdf file, if its not checked the link disappears, so toggle between the two.
Here's the check box I have so far, which isn't much:
<br><input type=checkbox name="Password" value="<%=oRs("Password")%>" size=40> Check to show PDF File: <a href="<%=oRs("Password")%>"><%=oRs("Password")%></a><br><br>
I need this hyperlink/ string to be encrypted based upon the persons name, so each person has its own pdf file and no one can just guess anothers pdf file and have access to it....
The pdf file will be stored in a virtual directory within the site.
I don't know Vb or asp, and I'm doing this all in notepad ++
how to encrypt / decrypt a string in VB.Net.I followed the example given here and wrote the following code (below). There's a text box, an "encrypt" button, and a "decrypt" button. The idea is to type something into the text box ("like 'hello world'"), click "encrypt", and see the encrypted version appear in the text box. Clicking "decrypt" should then take you back to the original string.
But when I try to encrypt I get an error when I try to "FlushFinalBlock". The error is: "Length of the data to encrypt is invalid".The "decrypt" part is a total shot in the dark, as the example quoted above only deals with encryption, not decryption. I'm sure it's wrong, but since I can't get "encrypt" to work I haven't tested it yet.
Imports System.Data.SqlClient Imports System.IO Imports System.Security.Cryptography Public Class Form1
i have found a few encrypt/decrypt tutorials online but either they dont work or they only work when the application is running so if i encrypt a string using some code i find and save it (in its encrypted form) and then restart the application and enter the saved encrypted string into a textbox and run the decrypt code it wont decrypt it. i don't understand why en/de-cryption is so hard or why there are so little working examples online. could someone be so kind and show me some code that can let me en/de-crypt a string even if i restart the application or use it on a different computer? and doesn't show the weak key errors all the time.
I've attempted using code snippets as a test to encrypt a string, save it to a file & the reload it back, decrypting it. I consistently get a "Padding is invalid and cannot be removed." error on decrypting the string.
I need to create a keyed hash for a string of XML to send to a 3rd party. This is the code I am using but it is producing a different hash then the example the 3rd party has sent me.
Public Shared Function HashString(ByVal StringToHash As String) As String Dim myEncoder As New System.Text.UTF32Encoding Dim Key() As Byte = myEncoder.GetBytes(My.Settings.PortalHASH) Dim XML() As Byte = myEncoder.GetBytes(StringToHash)
[code]....
It needs to be base-64 encoded, which is why I have the last line.
I want to encrypt all users' password that stored in database, but also i need to able to decrypt them.How can i do that?Because i try using MD5 method and only get one way ticket
I use the following code to initialize encryption...
[Code]...
So I don't think there is a method for PKCS5. Is there any way to add it, or do I need to write an encryption method myself? If so - how do I write that? Is there a reliable DLL that will support it?
encrypt the string values stored in the code.The problem is that when the code is compiled and the .exe file is generated, anybody can edit the .exe file with an text editor or another program and see the values.This is very important for me, because i have some password stored in string variables?
I know this topic has been addressed a million times but please help me out. I have read so many articles on HOW TO encrypt and decrypt the app.config file but I need to know WHEN and WHERE I should encrypt it.
The problem arose because we found an AppName.exe.config file on a users computer and the database username and password was clearly visible. I understand that the .config file gets created during the VB app install process and is used by the application. I then learned about the aspnet_regiis.exe tool and ran it on the app.config file inside my VB project. I am guessing that was the wrong thing to do.
When I now install the app on user desktops, it gives an error stating failed to decrypt the connection string. Also, when one of my other developers attempts to open the project in his copy of visual studio on his computer, he receives an error when trying to access the setting portion of the project properties. We store all of our projects on a file server and any developer can access the projects via a mapped drive on their computer.
So how am I supposed to encrypt the .config file. If I can't encrypt the App.config file in the development environment, then I'm guessing I have to perform the encryption on the users PC during the install process? How do I do that? Or is that what I am supposed to do?
Just for reference, here is the aspnet_regiis command I ran.
One last thing, maybe it's my misunderstanding of the issue but if this problem has existed since .Net 2.0, why has an option not been built into the development studio to encrypt connection strings?. This would seem to be a very common issue, even their own dataset wizard creates connection strings that are clearly readable.
I have a question about the App.Config file. My understanding is that the connection string is stored within this file. I have setup my application so that the App.Config file is not only written to c:users<username>appdatalocal but also to c:users<username>appdataoaming. I plan to encrypt the connection string, my question at this point is will it encrypt the connection string in ALL copies of the App.Config file? It looks like at this point that the App.Config file is stored in two places on the hard drive.
I have an app that I'm calling up a 3rd party API.. and on each call I want to store off the patient data in to logs that are like weekly.. so on each call to the API I want to encrypt the data and push as a line into a file..I kinda dont want to open the file.. add in data then encrypt the whole file, that seems like extra work to me.so if I want to encypt the data from string to byte whats the best way to push into a file and then read out.. should I set the string to be a certain lenght so my writes and reads match up ? or is there a way to write to a data file so that it knows the end of the entry ? should I use a type class for this ?
I'm just getting started with Visual Basic .NET and I'm currently stuck on the following problem: how can I encrypt/decrypt a file with asymmetric encryption?
Essentially, I'm trying to figure out how I can write the following pseudocode in VB
I have a classic ASP page which constructed a querystring for a link to an ASP.NET page. Certain elements in the querystring are somewhat sensitive so I want to encrypt them. I've come across some techniques for doing this in ASP.NET and also in classic ASP but I'm not sure how to do it from classic ASP to ASP.NET. I'm using .NET 3.5.
i am receiving an encrypted string from VB.NET in PHP. I am able to decrypt the key. But when i want to encrypt the result and get the encrtypted string i get a mismatch.Below is the PHP CODE.
<?php //$syscode=$_REQUEST['syscode']; //The actual string is "blueberry" which is encrypted in VB.NET and sent to PHP $syscode = "8yN73RDmMFuXo9ux8QKC6w=="; //This is the encrypted string as received from VB.NET
I'm building an application which transfers certain cofidential data over the internet through the TCP protocol. I wondered how I could encrypt the connection with