Openiddict-core: How to hash client secret to insert into database manually?

Created on 29 Jan 2018  路  4Comments  路  Source: openiddict/openiddict-core

Maybe create a dotGet package?
https://medium.com/@tonerdo/introducing-dotget-an-installer-for-net-core-cli-apps-9ba79ac7cd89

question

Most helpful comment

@PinpointTownes

my mistake, I mean use RNGCryptoServiceProvider to generate random string, then use Crypto.HashPassword for hashing.

All 4 comments

I do that with a simple console project with only one line codes:

Console.WriteLine(CryptoHelper.Crypto.HashPassword("a password"));

or you can use a random string generator such as RNGCryptoServiceProvider with Base64 encoding to get a random key.

or you can use a random string generator such as RNGCryptoServiceProvider with Base64 encoding to get a random key.

It's possible, but you'll have to override the default application managers (Crypto.HashPassword uses a special format that embeds a version, the hash and the salt in the same payload)

@PinpointTownes

my mistake, I mean use RNGCryptoServiceProvider to generate random string, then use Crypto.HashPassword for hashing.

I post dotnet global commands tutorial here in order someone (maybe me or my student) will create such a command.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlphaCreativeDev picture AlphaCreativeDev  路  3Comments

jedielson picture jedielson  路  5Comments

ivanmariychuk picture ivanmariychuk  路  6Comments

Typiqally picture Typiqally  路  4Comments

biapar picture biapar  路  5Comments