Questions tagged [rngcryptoserviceprovider]

27 questions
0
votes
1 answer

RNGCryptoServiceProvider take from /dev/random

When executing from Linux, is it possible to have RNGCryptoServiceProvider read from /dev/random pool? This is a requirement given to me. I am new to this and I have tried looking this up; not able to find any information on this sorry.
PKCS12
  • 407
  • 15
  • 41
0
votes
1 answer

c# How to generate RSA Key pair from Random Numbers generated using PRNG

I have generated random number using RNGCryptoServiceProvider, the next requirement is to generate a private, public RSA key pair which can be used for encryption/decryption purposes. How to construct the RSAParameters object using that random…
0
votes
0 answers

RNGCryptoServiceProvider Normalized values distribution

I am using C# RNGCryptoServiceProvider inside a using block byte[] values = new byte[ammountToCreate]; using (RNGCryptoServiceProvider randomizer = new RNGCryptoServiceProvider()) { randomizer.GetBytes(values); } The result values are then…
Slevin
  • 141
  • 1
  • 8
0
votes
1 answer

Seed for the salt in sha1 .net membership provider

The password salt for SHA1 Hashing is generated with the following function : (new RNGCryptoServiceProvider()).GetBytes(buf); What is used as the seed of RNGCryptoServiceProvider? Can the values of passwordsalt for the registered users in asp.net…
EngelbertCoder
  • 777
  • 2
  • 9
  • 29
0
votes
0 answers

Using Password Hash from SQL to Authenticate Windows C#

My plan is the following: Add logon name to SQL database. Save service account username and password to SQL database against each of these users, as a hash. User opens up app on their PC, it reads their logon name, checks if the service account…
0
votes
1 answer

Where is RNGProvider in Window Phone 8.1

I am developing an SDK (Nuget Package) for Windows Phone 8.1. I already have a version for Windows Phone 8 where there is a use of RNGCryptoServiceProvider. But while developing for Windows Phone 8.1, I discovered that this class is no more availble…
0
votes
1 answer

How can I do hash and salt to manage secure credentials in C# with SQL Server 2008

I would like to know how can I do salting & hashing of passwords? I've found in Internet a lot of examples about it, but I still can't do it well. I have this code to generate Salt and Hash public static byte[] GetSalt() { var p = new…
0
votes
0 answers

Password generation

I never tried to generate passwords myself but in this day of big companies getting hacked all the time, i feel it's safer to impose (generate and not let change except getting a newly generated for reset). The reasoning is that since users tend to…
Ronan Thibaudau
  • 3,413
  • 3
  • 29
  • 78
0
votes
0 answers

Generating random colors using RNGCryptoServiceProvider

I'm trying to generate random colors (without Alpha), using RNGCryptoServiceProvider, in C#, Windows Forms, .NET 2.0. (I will convert the colors using ColorTranslator.ToWin32, so the alpha value will simply be ignored.) I don't want to use the…
-1
votes
1 answer

How to get NextDouble from cryptogaphy random RandomNumberGenerator

I want to have a cryptographic random double, since RNGCryptoServiceProvider is obsolete in .NET 6 this question is not relevant How to generate a cryptographically secure Double between 0 and 1? RandomNumberGenerator is recommended, so does…
AnGG
  • 679
  • 3
  • 9
-1
votes
3 answers

RNGCryptoServiceProvider random string. always returns a string that ends with '='

static public string GetRandomSalt(int saltLength) { byte[] saltByte = new byte[saltLength]; using (var random = new RNGCryptoServiceProvider()) { random.GetBytes(saltByte); } return…
Lucas Chan
  • 87
  • 6
-1
votes
1 answer

Why I am getting 0 in value. I have debugged it and found I am getting 0 in value. Also when i am storing to database it also store 0

I am trying to generate random number using RNGCryptoServiceProvider, but some how I am getting o(Zero) in return private int generatePassword() { using (RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider()) { string value…
akshay_zz
  • 57
  • 1
  • 10
1
2