Terraria v1.4.4.9
Terraria source code documentation
|
Static Public Member Functions | |
static string | UpgradeDSS (int dwProvType, string wszProvider) |
static string | UpgradeRSA (int dwProvType, string wszProvider) |
static int | OpenCSP (CspParameters cspParameters, uint flags, out SafeProvHandle safeProvHandle) |
static object | GetProviderParameter (SafeProvHandle safeProvHandle, int keyNumber, int keyParam) |
static int | NameOrOidToHashAlgId (string nameOrOid, OidGroup oidGroup) |
static int | ObjToHashAlgId (object hashAlg) |
static byte[] | SignValue (SafeProvHandle hProv, SafeKeyHandle hKey, int keyNumber, int calgKey, int calgHash, byte[] hash) |
static bool | VerifySign (SafeProvHandle hProv, SafeKeyHandle hKey, int calgKey, int calgHash, byte[] hash, byte[] signature) |
static void | DeriveKey (SafeProvHandle hProv, int algid, int algidHash, byte[] password, int cbPassword, int dwFlags, byte[] IV_Out, int cbIV_In, [NotNull] ref byte[] pbKey) |
static CryptographicException | GetBadDataException () |
static CryptographicException | GetEFailException () |
static bool | CryptGetUserKey (SafeProvHandle safeProvHandle, int dwKeySpec, out SafeKeyHandle safeKeyHandle) |
static bool | CryptGenKey (SafeProvHandle safeProvHandle, int algId, int dwFlags, out SafeKeyHandle safeKeyHandle) |
static unsafe bool | CryptImportKey (SafeProvHandle hProv, ReadOnlySpan< byte > pbData, SafeKeyHandle hPubKey, int dwFlags, out SafeKeyHandle phKey) |
static bool | CryptCreateHash (SafeProvHandle hProv, int algId, SafeKeyHandle hKey, global::Interop.Advapi32.CryptCreateHashFlags dwFlags, out SafeHashHandle phHash) |
static bool | CryptDeriveKey (SafeProvHandle hProv, int algId, SafeHashHandle phHash, int dwFlags, out SafeKeyHandle phKey) |
Package Types | |
enum | CryptGetKeyParamQueryType { KP_IV = 1 , KP_MODE = 4 , KP_MODE_BITS = 5 , KP_EFFECTIVE_KEYLEN = 19 , KP_KEYLEN = 9 , KP_ALGID = 7 } |
enum | CspAlgorithmType { Rsa , Dss } |
Static Package Functions | |
static byte[] | ToKeyBlob (this DSAParameters dsaParameters) |
static DSAParameters | ToDSAParameters (this byte[] cspBlob, bool includePrivateParameters, byte[] cspPublicBlob) |
static byte[] | ToKeyBlob (this RSAParameters rsaParameters) |
static RSAParameters | ToRSAParameters (this byte[] cspBlob, bool includePrivateParameters) |
static byte | GetKeyBlobHeaderVersion (byte[] cspBlob) |
static string | GetDefaultProvider (int dwType) |
static void | AcquireCsp (CspParameters cspParameters, out SafeProvHandle safeProvHandle) |
static SafeProvHandle | CreateProvHandle (CspParameters parameters, bool randomKeyContainer) |
static bool | IsFlagBitSet (uint dwImp, uint flag) |
static int | GetProviderParameterWorker (SafeProvHandle safeProvHandle, byte[] impType, ref int cb, global::Interop.Advapi32.CryptProvParam flags) |
static int | GetUserKey (SafeProvHandle safeProvHandle, int keySpec, out SafeKeyHandle safeKeyHandle) |
static int | GenerateKey (SafeProvHandle safeProvHandle, int algID, int flags, uint keySize, out SafeKeyHandle safeKeyHandle) |
static int | MapCspKeyFlags (int flags) |
static uint | MapCspProviderFlags (int flags) |
static void | VerifyValidHandle (SafeHandleZeroOrMinusOneIsInvalid handle) |
static byte[] | GetKeyParameter (SafeKeyHandle safeKeyHandle, int keyParam) |
static void | SetKeyParameter (SafeKeyHandle safeKeyHandle, CryptGetKeyParamQueryType keyParam, byte[] value) |
static void | SetKeyParameter (SafeKeyHandle safeKeyHandle, CryptGetKeyParamQueryType keyParam, int value) |
static CspParameters | SaveCspParameters (CspAlgorithmType keyType, CspParameters userParameters, CspProviderFlags defaultFlags, out bool randomKeyContainer) |
static SafeKeyHandle | GetKeyPairHelper (CspAlgorithmType keyType, CspParameters parameters, int keySize, SafeProvHandle safeProvHandle) |
static int | GetErrorCode () |
static bool | GetPersistKeyInCsp (SafeProvHandle safeProvHandle) |
static void | SetPersistKeyInCsp (SafeProvHandle safeProvHandle, bool fPersistKeyInCsp) |
static void | DecryptKey (SafeKeyHandle safeKeyHandle, byte[] encryptedData, int encryptedDataLength, bool fOAEP, out byte[] decryptedData) |
static void | EncryptKey (SafeKeyHandle safeKeyHandle, byte[] pbKey, int cbKey, bool foep, [NotNull] ref byte[] pbEncryptedKey) |
static int | EncryptData (SafeKeyHandle hKey, ReadOnlySpan< byte > input, Span< byte > output, bool isFinal) |
static int | DecryptData (SafeKeyHandle hKey, ReadOnlySpan< byte > input, Span< byte > output) |
static void | ImportKeyBlob (SafeProvHandle saveProvHandle, CspProviderFlags flags, bool addNoSaltFlag, byte[] keyBlob, out SafeKeyHandle safeKeyHandle) |
static byte[] | ExportKeyBlob (bool includePrivateParameters, SafeKeyHandle safeKeyHandle) |
static HashAlgorithm | ObjToHashAlgorithm (object hashAlg) |
static byte[] | ToPlainTextKeyBlob (int algId, byte[] rawKey) |
Properties | |
static ReadOnlySpan< byte > | RgbPubKey [get] |
Static Private Member Functions | |
static void | ReadKeyBlobHeader (BinaryReader br, out byte bVersion) |
static void | WriteKeyBlobHeader (DSAParameters dsaParameters, BinaryWriter bw, bool isPrivate, out bool isV3) |
static void | ReadDSSSeed (DSAParameters dsaParameters, BinaryReader br, bool isV3) |
static void | WriteDSSSeed (DSAParameters dsaParameters, BinaryWriter bw) |
static void | WriteReversed (this BinaryWriter bw, byte[] bytes) |
static byte[] | ExponentAsBytes (uint exponent) |
static byte[] | ReadReversed (this BinaryReader br, int count) |
static void | ReverseDsaSignature (byte[] signature, int cbSignature) |
static void | CreateCSP (CspParameters parameters, bool randomKeyContainer, out SafeProvHandle safeProvHandle) |
static int | AcquireCryptContext (out SafeProvHandle safeProvHandle, string keyContainer, string providerName, int providerType, uint flags) |
static void | ValidateCspFlags (CspProviderFlags flags) |
static int | GetAlgIdFromOid (string oid, OidGroup oidGroup) |
static void | UnloadKey (SafeProvHandle hProv, SafeKeyHandle hKey, [NotNull] ref byte[] key_out, ref int cb_out) |
static SafeHashHandle | CreateHashHandle (this SafeProvHandle hProv, byte[] hash, int calgHash) |
static SafeHashHandle | CreateHashHandle (this SafeProvHandle hProv, byte[] hash, int calgHash, bool throwOnSizeError) |
static void | WriteKeyBlobHeader (int algId, BinaryWriter bw) |
Definition at line 13 of file CapiHelper.cs.