Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ImportCspBlob()

void System.Security.Cryptography.DSACryptoServiceProvider.ImportCspBlob ( byte[] keyBlob)
inline

Implements System.Security.Cryptography.ICspAsymmetricAlgorithm.

Definition at line 236 of file DSACryptoServiceProvider.cs.

237 {
239 SafeKeyHandle safeKeyHandle;
240 if (IsPublic(keyBlob))
241 {
242 SafeProvHandle safeProvHandle = AcquireSafeProviderHandle();
243 CapiHelper.ImportKeyBlob(safeProvHandle, CspProviderFlags.NoFlags, addNoSaltFlag: false, keyBlob, out safeKeyHandle);
244 SafeProvHandle = safeProvHandle;
245 }
246 else
247 {
248 CapiHelper.ImportKeyBlob(SafeProvHandle, _parameters.Flags, addNoSaltFlag: false, keyBlob, out safeKeyHandle);
249 }
250 SafeKeyHandle = safeKeyHandle;
251 }
static void ImportKeyBlob(SafeProvHandle saveProvHandle, CspProviderFlags flags, bool addNoSaltFlag, byte[] keyBlob, out SafeKeyHandle safeKeyHandle)

References System.Security.Cryptography.DSACryptoServiceProvider._parameters, System.Security.Cryptography.DSACryptoServiceProvider.AcquireSafeProviderHandle(), System.Security.Cryptography.CspParameters.Flags, Internal.NativeCrypto.CapiHelper.ImportKeyBlob(), System.Security.Cryptography.DSACryptoServiceProvider.IsPublic(), and System.Security.Cryptography.DSACryptoServiceProvider.ThrowIfDisposed().

Referenced by Internal.Cryptography.Pal.X509Pal.DecodePublicKey(), and System.Security.Cryptography.DSACryptoServiceProvider.ImportParameters().