Access Vba - Console App To Return SHA512 Hash?

Jan 24, 2011

I'm trying to write a console application in VB.Net (2008) to accept a command line argument input (a password) and output the hash. I modified the code here so that it would accept an argument and I added my own salt/key but the output appears to be incorrect when compared to PHP's output for the same password and salt.I need something like this so I will have a way to get a SHA512 hash using MS Access VBA. Can you recommend a better solution than what I'm trying or point me to something simpler than the link above? I could possibly post my code here but it's quite long.

View 1 Replies


ADVERTISEMENT

Encrypt File From Sha512 Hash?

Aug 23, 2011

Would like to know how to encrypt a file (lets say a .txt or .xml) with SHA512 hash ? How to proceed ?

What i would want to do is.. check if the file exist.. open it and then read it while unencrypting it.

View 2 Replies

Using SHA256 + SHA512 Hash For Password?

Dec 1, 2011

I'm creating a method that I will use to hash password to store in a database. I would like to seek advice if my methods in hashing is sufficient or overkill for the task.

Dim result As Byte()
Dim mixer As String
ry

[code].....

View 1 Replies

SHA512 Hash - Input String Not In Correct Format

Jun 21, 2011

I have the following function for generating sha512 hashs. The hash is generated successfully, but is causing this error when the resulting string is passed to other functions:
Input string was not in a correct format

When debugged the variable holding the returned hash (set as string) is empty. I have tried changing the type to int, int64 and byte (array and standard variable) in the function and in the calling code, which causes various other errors. How can I change the datatype correctly to solve this?

Function create_hash(ByVal password, ByVal salt)
Dim salty As String = password & salt
'convert salty password to binary to feed into hash function
Dim encText As New System.Text.UTF8Encoding()
Dim btText() As Byte
[Code] .....

Calling code:
Dim i_h_pass As String
Dim i_pass As String = pass.Text
'handle password generation (matching passwords checked at validation)
Dim newHash = New hashing
Dim salt As String = Convert.ToString(newHash.create_salt)
i_h_pass = Convert.ToString(newHash.create_hash(i_pass, salt))

The create_salt function has also been checked - it works perfectly and returns a random integer, returned as string for convenience.

View 1 Replies

SHA512 Encryption - Encrypt The Word 'test' And Get Encrypted Hash

Jun 11, 2011

so I'm creating a program that creates a SHA512 hash. I have a problem though. I try to encrypt the word 'test' and I get this encrypted hash as:

[Code]...

View 6 Replies

.net - Store SHA256 Hash In Access Database?

Feb 4, 2012

how to store a hash in my Access Database. Now I have generated a hash by salting a user password with the User ID (not highly secure I know, but plenty for my purposes). I have also stored the hashed values in the database as Base64 strings (manually, I haven't yet developed the module to do that automatically), however, when I go to retrieve the hash from the database I receive the hex code in place of the string. This is the code for the login button:

Sub prcLogin()
'Log User in
Dim ds As New DataSet
Dim blnCorrect As Boolean

[code]....

But when I run this instead of returning a value like "rlzhYoiO4+vpdJdsrFq5Sj9VBJ+FFYhIg9V5+z+jeNI=" which I stored in the database, it returns a value like "5C6BED0D94

View 3 Replies

SHA512 Generate Different Result?

May 3, 2011

I tried to use the following code to generate hash string,

Dim data() As Byte
Dim result() As Byte
Dim uEncode As New System.Text.UnicodeEncoding()

[code]......

View 2 Replies

.NET Console StandardOutput Does Not Return Input "question"

Jun 28, 2011

I am trying to completely intercept a console application, that is, grabbing it's output, and inserting the input. So far, I can pretty much grab the output, and input is completely perfect. However, it will not show the "prefix"/"question" of the console's output, until you send some input. As an example, when hooking to the CMD.exe console. When you regularly start it up in Windows, you get something like this:

[Code]...

View 1 Replies

Export Access Query To Excel In Console App?

Jun 27, 2012

I have a query being created using oledb from access and need to get the information to an already existing excel spread sheet. I am using VS 2010 with vb.net, access and excel are 2010. I have been running in circles for the last two days and cannot figure out how to get the data from a datareader into excel. This is a vb.net console app, so no web tables or grids can be used.

Dim conn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:PureshowPureshow.mdb;")
Dim cmd As New OleDb.OleDbCommand("SELECT PWTC08.Lot AS LotID, PWTC08.Reg AS OfficialID FROM ((PWTC08 INNER JOIN SWTC08 ON cint(LEFT(PWTC08.Lot,

[Code]....

I am almost to the point of just outputting to a CSV and telling the user to import into excel each time. I can export to excel if I put it in a webform, but I cannot figure out how to do using a console app.

View 1 Replies

Granting Access To Path In Console Application?

Aug 25, 2009

I am writing a program that is going to copy files from one server to another but I need to provide the user name and password in order to avoid receiving the Access to the path "..." is denied error. I have the username and password but where would I put it in my program in order to get access.For example I am using the Directory.GetFiles( string ) command to list the files of the directory. What do I need to add to it so I can get access?

View 2 Replies

VB Console Application Process Cannot Access The File?

Feb 23, 2009

I am having this IOException error in my VB Console application i created. Following is the code and the exception is occuring on the highlighted line. If anyone has any pointers or suggestion to solving this problem, please let me know.

[Code]...

View 6 Replies

Create User Which Can't Login To Console But Which Can Access Secure Folders From Remote?

Jun 14, 2009

I think it should be something related with "Local Security Policy".

View 1 Replies

DB/Reporting :: Why Cannot Return The Table From Access

Mar 9, 2011

There are two combo boxes taking user's inputs to return a record in an Access Database satisfying the requirements. This procedure is controlled by a button. However, when it reads "da.Fill(dt, "NETP_ParaList")". It reports error saying that "ArgumentException was unhandled; Object is not an ADODB.RecordSet or an ADODB.Record. Parameter name: adodb" I have no idea what this talking about.

[Code]...

View 1 Replies

Asp.net - Use ExecuteSQLCommand And Return Data In A Datatable And Access It?

Sep 15, 2010

This is what I'm trying...

Dim myCommand as SqlCommand
Dim myTable as New xsdObject.ObjectDataTable
myCommand = DataAccess.GetSQLCommand( "MyStoredProc", _

[code]....

'How to access my data ?

View 1 Replies

Use ExecuteSQLCommand And Return My Data In A Datatable And Access It?

Nov 4, 2011

Use ExecuteSQLCommand and return my data in a datatable and access it? This is what I'm trying.[code]...

View 2 Replies

Using Access Cases To Return Query Into Datagridview

Feb 10, 2012

I have an access table and I want to write a query that has a case in it, but it gives me an error message when running the query Error "Syntax Error missing operator in query expression"

[Code]...

View 8 Replies

VS 2010 Access Database + TableAdapters: Return Last ID?

Nov 15, 2010

I am using an Access database (mdb file) and for the first time ever I'm connecting to it using a bunch of TableAdapters created in a DataSet.xsd file.I added an Insert query to a TableAdapter, and now I need to retrieve the ID (autonumber) of the last inserted record. Usually, I would send a "SELECT SCOPE_IDENTITY()" query and it would return the ID, but for some reason I cannot get this to work with the TableAdapter.

I tried two methods:1. Add the SELECT SCOPE_IDENTITY() query directly after the INSERT query in the TableAdapter. This method is described in every website I found by googling my problem. Suppose my INSERT query is this:

INSERT INTO Test VALUES("1", "2", "3")
then I should now modify it into
INSERT INTO Test VALUES("1", "2", "3");
SELECT SCOPE_IDENTITY()
I also changed the ExecuteMode to Scalar.

Ok, I run this code, but it doesn't work. It gives me an error saying Characters found after end of SQL statement.Is it because I am using Access and not SQL Server maybe? I dunno... But whatever I try it doesn't work. It's not a spelling error, and I did type the semicolon to separate the two queries so as far as I know it should work.2. Add a separate Select query (selected 'Select query that returns a single value' in the designer) that simply executes this:

SELECT SCOPE_IDENTITY()Then after using the Insert query I can simply call this query method and get the last Id. But unfortunately this doesn't work either. It doesn't even let me add this query in the designer, it says Unable to parse query text.

View 13 Replies

What Return Type To Use In Data Access Layer

Mar 1, 2010

Im writing a data access layer for my application.There are several functions that need to return a list of items like Employee Name, and EmployeeID so it can be bound to a dropdownlist.What would be the proper datatype to return, a Dictionary?The lists only contain 2 columns, a name and id.

View 5 Replies

MS Access Function To Return Conditional Column For Query?

May 21, 2009

I'm working on an access database and there is a problem I can solve in a circumvented way but I was wondering if it can be done by using a function in query.The case: I have a main data table and 2 other tables joined to it.

maintable
country | city...... | postalcode [code].....

From one of the tables I select the respective zone for the postal codes in the main datatable, ie. if the row's postal code column contains 1000 (just an exmple) then the postal code is searched in the "zone" table "from" & "to" columns using "between", and it results in for example "zone1" (zone column). This is a clear thing, it works okay.However I need to select the respective rate column (based on the rows' weight column) from the rates table selecting the appropriate zone.

I can solve this by a switch statment (select country, city.... switch( zone="1", [1], zone="2", [2] etc.) but it gets very tedious when for example I have a rate table with 15 columns, you can imagine that.My question is if I could create a custom function which returned the respective column based on the result of the zone column.is there some way to get the function's return value to be translated in the select statement? for example select country, city....getzone("rates",[zone]) .....

I know that the rates table do not follow the relational database's main principle and it should look like fromkg | tokg | zone | rate and it would work like a charm with "where"but these tables are changed regularly and I receive them in excel...but maybe transforming the tables each time by unions would easily solve my problem doesnt it?I'm still interested if VBA custom function could be used for such a purpose.

View 3 Replies

Return A Total Of A Column In An Access Database Using SELECT Sum()?

Apr 15, 2010

I don't know if this is the best way to do it or not but here goes.I have an access database and a datagridview and they link via a SELECT statement at runtime.I want to total one column named LNLMTS and display the result.I am looking at using SELECT Sum LNLMTS FROM tblProduction WHERE SO=@so AND DATE=@date

View 8 Replies

Return Data From An Access Record From User Input?

Feb 17, 2011

It's been a good few years since I dabbled in VB and I'm very very rusty so any help would be great! What I'm looking to do is search an access database with user input and display the relevant record.I have a single table set up in an access database called school_info with the following fields and data:

Tres________DfE________Name_________Type
001________1234________School 1________Primary
002________4321________School 2________Secondary

[code]...

I've linked the database to my new project, connected the database and added the 4 fields to my form. When I run it, the data shows in the boxes fine.The Tres and DfE fields are show in text boxes on the VB form, and the school and Type are show in labels. What I really want to do is be able to manually type in either a Tres or DfE number into the relevant text field and have the other labels auto populate with the relevant data that's stored in the database table.

View 9 Replies

Search Access Database And Return Data To Textbox

Apr 22, 2011

I've created a basic search form. I have a textbox with a search button and an Access Database as the backend. I have also added it as a new datasource. What I'm looking to do is grab the search string from one textbox and return the data to another textboxt. I have a table called "VehicleInfo" and I want to search the field in my table called "VehicleID" and return the vehicleID I searched for into another textbox. I'm really new to VB. I understand databases and basic code structure, I just don't have a good grasp yet on how these two work together.

Public Class frmMain
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Garage_ServiceDataSet.Service' table. You can move, or remove it, as needed.
Me.ServiceTableAdapter.Fill(Me.Garage_ServiceDataSet.Service)
[Code] .....

View 7 Replies

VS 2008 Return Dataset From Access Stored Query

Feb 7, 2010

I am trying to call a SELECT query (with parameters) in Access from VB.Net 2008. I am able to call queries without parameters using the code below. The problems are (1) how to apply the parameters to procName and (2) how to get a dataset returned. I have looked around the net for hours and have found some examples. However, they are all for ms access action (update, delete, etc) queries using ExecuteNonQuery which does not return a dataset.

[Code]...

View 1 Replies

C# - In A .NET Console App, Have A Line Of Text Stay Visible In The Console All The Time?

Jun 1, 2011

I was thinking of adding a simple bandwidth monitor to a console application and I was wondering if it would be possible to keep a line in the console window visible at all times. I could set something up manually to pass new console output into a method that would get the contents of the console, clear the console, add the bandwidth data on the first row, then rewrite each line of previous information back to the console, etc.. but that seems like a really hacky way to go about it, and I'd be limited to the amount of rows visible at once in the console window (no scrolling).

STATS: Downloaded: 2599b, Uploaded: 754b <- this always stays at the top
constantly changing text
constantly changing text
constantly changing text

[code]....

View 3 Replies

Creating Data Access Layer - Return My Object But Not All The Fields

Jun 21, 2010

I'm creating my Data Access Layer and I want to return my object but not all the fields so this is the code i'm using

CODE:

I then call this method in the Business Logic Layer

CODE:

lastly I try to call in in my user interface and bind it to a DataGridView

CODE:

But I keep getting this error: Unable to cast object of type 'System.Data.Linq.DataQuery`1[VB$AnonymousType_0`3[System.String,System.String,System.String]]' to type 'System.Collections.Generic.IEnumerable`1[PP_DAL.DCProposal]'.

View 2 Replies

Loop To Ping A List Of Ip's Return The Results And Save Them To An Access Db

Aug 6, 2009

Sorry for new thread--i have this code, basically a loop to ping a list of ip's return the results and save them to an access db:

[Code]...

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code]...

View 24 Replies

Query That Will Return All Of Column Names In A Microsoft Access Table?

Aug 17, 2010

I have a Microsoft Access database that I connect to with the Jet Database Engine, using VB.NET. I want to programmatically get all of the column names for a particular table [code]...

Is this possible in Access? If not, what are my options for getting the column names?

View 1 Replies

C# - .Net Console Application That Doesn't Bring Up A Console?

Jun 1, 2009

I have a console application I'm using to run scheduled jobs through windows scheduler. All the communication to/from the application is in email, event logging, database logs. Is there any way I can suppress the console window from coming up?

View 5 Replies

Keeping Console From Closing & Writing To The Console?

May 11, 2011

so I am making a program that will run a server for a game. I've programmed a console into the form and it works but it only works until it is finished reading the slandered output.

[Code]...

View 2 Replies

Getting A Different Hash Value?

Nov 16, 2011

I am at a bit of a loss at the moment. What I am basically writing is the password elements of a membership system. What I do is generate a random salt value, take the registered password, combine the two and then pass the new string through a function which will generate a SHAManaged 512 hash.

I then convert the hash and salt string into Byte arrays and store these in my database.The problem comes when I then compare a login attempt against the original value I am being supplied with a completely different hash for the password being presented by the user, even though it should be exactly the same.

Here is my code when someone registers their new account:

[Code]...

View 15 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved