cryptography - RNGCryptoServiceProvider in .Net Core -


i cannot find system.security.cryptography.rngcryptoserviceprovider class in .netcore.

it essential application trying port .net framework, being used generate initialisation vector encryption.

does exist under different name, or there way of achieving functionality?

system.security.cryptography.randomnumbergenerator base class cryptographically-secure pseudo-random number generator (csprng) implementations. in .net framework randomnumbergenerator.create() returns rngcryptoserviceprovider instance (unless configured differently cryptoconfig). in .net core randomnumbergenerator.create() returns opaque type based on bcryptgenrandom (windows) or openssl's random number generator (!windows).

randomnumbergenerator.create() way rng instance on .net core, , since works on both .net core , .net framework portable.

of course, if you're generating iv, can call instance method symmetricalgorithm.generateiv() have use csprng internally; though documentation says, calling unnecessary random iv created instance (generateiv can used force generate new 1 before next call createencryptor).


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -