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
Post a Comment