423,682 Members | 1,327 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,682 IT Pros & Developers. It's quick & easy.

What would I declare hashedPassword, please?

P: 49
In the following, please, what would I declare 'hashedPassword' as?

Expand|Select|Wrap|Line Numbers
  1. cmd.Parameters.AddWithValue("@username", username)
  2.             cmd.Parameters.AddWithValue("@strEmail", email)
  3.             Dim hashedPassword = Crypto.HashPassword(password)
  4.             cmd.Parameters.AddWithValue("@hashed", hashedPassword)
  5.             connection.Open()
  6.             cmd.ExecuteNonQuery()
Thank you.

Blue
Sep 6 '18 #1
Share this Question
Share on Google+
2 Replies


zmbd
Expert Mod 5K+
P: 5,285
The value returned is a String type cast
Crypto.HashPassword Method Syntax
Expand|Select|Wrap|Line Numbers
  1. 'Declaration
  2. Public Shared Function HashPassword ( _
  3.     password As String _
  4. ) As String
  5. 'Usage
  6. Dim password As String 
  7. Dim returnValue As String 
  8.  
  9. returnValue = Crypto.HashPassword(password)
Parameters
passwordType: System.String
The password to generate a hash value for.

Return Value
Type: System.String
The hash value for password as a base-64-encoded string.
Sep 8 '18 #2

P: 49
Many thanks for that zmbd!
4 Days Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.