By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,222 Members | 1,730 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,222 IT Pros & Developers. It's quick & easy.

What would I declare hashedPassword, please?

P: 56
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.

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

Expert Mod 5K+
P: 5,397
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 
  9. returnValue = Crypto.HashPassword(password)
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: 56
Many thanks for that zmbd!
Nov 16 '18 #3

Post your reply

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