This repository has been archived by the owner on Jul 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate Span<T> overloads where arrays would be
Closes #444
- Loading branch information
Showing
21 changed files
with
305 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
static PInvoke.AdvApi32.CryptGetHashParam(PInvoke.AdvApi32.SafeHashHandle hHash, PInvoke.AdvApi32.CryptGetHashParamFlags dwParam, System.Span<byte> pbData, ref int pdwDataLen, uint dwFlags) -> bool | ||
static PInvoke.AdvApi32.CryptHashData(PInvoke.AdvApi32.SafeHashHandle hHash, System.ReadOnlySpan<byte> pbData, PInvoke.AdvApi32.CryptHashDataFlags flags) -> bool | ||
static PInvoke.AdvApi32.EnumServicesStatus(PInvoke.AdvApi32.SafeServiceHandle hSCManager, PInvoke.AdvApi32.ServiceType dwServiceType, PInvoke.AdvApi32.ServiceStateQuery dwServiceState, System.Span<byte> lpServices, ref int pcbBytesNeeded, ref int lpServicesReturned, ref int lpResumeHandle) -> bool | ||
static PInvoke.AdvApi32.LookupPrivilegeValue(System.IntPtr lpSystemName, System.IntPtr lpName, System.IntPtr lpLuid) -> bool | ||
static PInvoke.AdvApi32.LookupPrivilegeValue(System.ReadOnlySpan<char> lpSystemName, System.ReadOnlySpan<char> lpName, out PInvoke.User32.LUID lpLuid) -> bool | ||
static PInvoke.AdvApi32.LookupPrivilegeValue(char[] lpSystemName, char[] lpName, out PInvoke.User32.LUID lpLuid) -> bool | ||
static extern PInvoke.AdvApi32.LookupPrivilegeValue(char* lpSystemName, char* lpName, PInvoke.User32.LUID* lpLuid) -> bool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,28 @@ | ||
PInvoke.BCrypt.BCryptKeyDerivationFlags | ||
PInvoke.BCrypt.BCryptKeyDerivationFlags.BCRYPT_CAPI_AES_FLAG = 16 -> PInvoke.BCrypt.BCryptKeyDerivationFlags | ||
PInvoke.BCrypt.BCryptKeyDerivationFlags.None = 0 -> PInvoke.BCrypt.BCryptKeyDerivationFlags | ||
static PInvoke.BCrypt.BCryptCreateHash(PInvoke.BCrypt.SafeAlgorithmHandle hAlgorithm, out PInvoke.BCrypt.SafeHashHandle phHash, System.Span<byte> pbHashObject, System.ReadOnlySpan<byte> pbSecret, PInvoke.BCrypt.BCryptCreateHashFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptCreateMultiHash(PInvoke.BCrypt.SafeAlgorithmHandle hAlgorithm, out PInvoke.BCrypt.SafeHashHandle phHash, int nHashes, System.Span<byte> pbHashObject, System.ReadOnlySpan<byte> pbSecret, PInvoke.BCrypt.BCryptCreateHashFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptDecrypt(PInvoke.BCrypt.SafeKeyHandle hKey, System.ReadOnlySpan<byte> pbInput, System.IntPtr pPaddingInfo, System.ReadOnlySpan<byte> pbIV, System.Span<byte> pbOutput, out int pcbResult, PInvoke.BCrypt.BCryptEncryptFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptDecrypt(PInvoke.BCrypt.SafeKeyHandle hKey, System.ReadOnlySpan<byte> pbInput, void* pPaddingInfo, System.ReadOnlySpan<byte> pbIV, System.Span<byte> pbOutput, out int pcbResult, PInvoke.BCrypt.BCryptEncryptFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptDeriveKey(PInvoke.BCrypt.SafeSecretHandle sharedSecret, string keyDerivationFunction, PInvoke.BCrypt.BCryptBufferDesc? kdfParameters, System.Span<byte> derivedKey, out int resultSize, PInvoke.BCrypt.BCryptDeriveKeyFlags flags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptEncrypt(PInvoke.BCrypt.SafeKeyHandle hKey, System.ReadOnlySpan<byte> pbInput, System.IntPtr pPaddingInfo, System.ReadOnlySpan<byte> pbIV, System.Span<byte> pbOutput, out int pcbResult, PInvoke.BCrypt.BCryptEncryptFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptEncrypt(PInvoke.BCrypt.SafeKeyHandle hKey, System.ReadOnlySpan<byte> pbInput, void* pPaddingInfo, System.ReadOnlySpan<byte> pbIV, System.Span<byte> pbOutput, out int pcbResult, PInvoke.BCrypt.BCryptEncryptFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptExportKey(PInvoke.BCrypt.SafeKeyHandle hKey, PInvoke.BCrypt.SafeKeyHandle hExportKey, string pszBlobType, System.Span<byte> pbOutput, out int pcbResult, PInvoke.BCrypt.BCryptExportKeyFlags dwFlags = PInvoke.BCrypt.BCryptExportKeyFlags.None) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptFinishHash(PInvoke.BCrypt.SafeHashHandle hHash, System.Span<byte> pbOutput, PInvoke.BCrypt.BCryptFinishHashFlags dwFlags = PInvoke.BCrypt.BCryptFinishHashFlags.None) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptGenRandom(PInvoke.BCrypt.SafeAlgorithmHandle hAlgorithm, System.Span<byte> pbBuffer, PInvoke.BCrypt.BCryptGenRandomFlags flags = PInvoke.BCrypt.BCryptGenRandomFlags.None) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptGenerateSymmetricKey(PInvoke.BCrypt.SafeAlgorithmHandle hAlgorithm, out PInvoke.BCrypt.SafeKeyHandle phKey, System.Span<byte> pbKeyObject, System.ReadOnlySpan<byte> pbSecret, PInvoke.BCrypt.BCryptGenerateSymmetricKeyFlags flags = PInvoke.BCrypt.BCryptGenerateSymmetricKeyFlags.None) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptGetProperty(System.Runtime.InteropServices.SafeHandle hObject, string property, System.Span<byte> output, out int resultSize, PInvoke.BCrypt.BCryptGetPropertyFlags flags = PInvoke.BCrypt.BCryptGetPropertyFlags.None) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptHashData(PInvoke.BCrypt.SafeHashHandle hHash, System.ReadOnlySpan<byte> pbInput, PInvoke.BCrypt.BCryptHashDataFlags dwFlags = PInvoke.BCrypt.BCryptHashDataFlags.None) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptImportKey(PInvoke.BCrypt.SafeAlgorithmHandle hAlgorithm, PInvoke.BCrypt.SafeKeyHandle hImportKey, string pszBlobType, out PInvoke.BCrypt.SafeKeyHandle phKey, System.Span<byte> pbKeyObject, System.ReadOnlySpan<byte> pbInput, PInvoke.BCrypt.BCryptImportKeyFlags dwFlags = PInvoke.BCrypt.BCryptImportKeyFlags.None) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptImportKeyPair(PInvoke.BCrypt.SafeAlgorithmHandle hAlgorithm, PInvoke.BCrypt.SafeKeyHandle hImportKey, string pszBlobType, out PInvoke.BCrypt.SafeKeyHandle phKey, System.ReadOnlySpan<byte> pbInput, PInvoke.BCrypt.BCryptImportKeyPairFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptKeyDerivation(PInvoke.BCrypt.SafeKeyHandle hKey, PInvoke.BCrypt.BCryptBufferDesc? pParameterList, System.Span<byte> pbDerivedKey, int cbDerivedKey, out int pcbResult, PInvoke.BCrypt.BCryptKeyDerivationFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptKeyDerivation(PInvoke.BCrypt.SafeKeyHandle hKey, PInvoke.BCrypt.BCryptBufferDesc? pParameterList, byte[] pbDerivedKey, int cbDerivedKey, out int pcbResult, PInvoke.BCrypt.BCryptKeyDerivationFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptKeyDerivation(PInvoke.BCrypt.SafeKeyHandle hKey, System.IntPtr pParameterList, System.IntPtr pbDerivedKey, int cbDerivedKey, out int pcbResult, PInvoke.BCrypt.BCryptKeyDerivationFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptProcessMultiOperations(PInvoke.BCrypt.SafeHashHandle hHash, PInvoke.BCrypt.BCRYPT_MULTI_OPERATION_TYPE operationType, System.ReadOnlySpan<PInvoke.BCrypt.BCRYPT_MULTI_HASH_OPERATION> pOperations, int cbOperations, int dwFlags = 0) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptSetProperty(System.Runtime.InteropServices.SafeHandle hObject, string pszProperty, System.ReadOnlySpan<byte> pbInput, PInvoke.BCrypt.BCryptSetPropertyFlags dwFlags = PInvoke.BCrypt.BCryptSetPropertyFlags.None) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptSignHash(PInvoke.BCrypt.SafeKeyHandle hKey, System.IntPtr pPaddingInfo, System.ReadOnlySpan<byte> pbInput, System.Span<byte> pbOutput, out int pcbResult, PInvoke.BCrypt.BCryptSignHashFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptSignHash(PInvoke.BCrypt.SafeKeyHandle hKey, void* pPaddingInfo, System.ReadOnlySpan<byte> pbInput, System.Span<byte> pbOutput, out int pcbResult, PInvoke.BCrypt.BCryptSignHashFlags dwFlags) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptVerifySignature(PInvoke.BCrypt.SafeKeyHandle hKey, System.IntPtr pPaddingInfo, System.ReadOnlySpan<byte> pbHash, System.ReadOnlySpan<byte> pbSignature, PInvoke.BCrypt.BCryptSignHashFlags dwFlags = PInvoke.BCrypt.BCryptSignHashFlags.None) -> PInvoke.NTSTATUS | ||
static PInvoke.BCrypt.BCryptVerifySignature(PInvoke.BCrypt.SafeKeyHandle hKey, void* pPaddingInfo, System.ReadOnlySpan<byte> pbHash, System.ReadOnlySpan<byte> pbSignature, PInvoke.BCrypt.BCryptSignHashFlags dwFlags = PInvoke.BCrypt.BCryptSignHashFlags.None) -> PInvoke.NTSTATUS | ||
static extern PInvoke.BCrypt.BCryptKeyDerivation(PInvoke.BCrypt.SafeKeyHandle hKey, PInvoke.BCrypt.BCryptBufferDesc* pParameterList, byte* pbDerivedKey, int cbDerivedKey, out int pcbResult, PInvoke.BCrypt.BCryptKeyDerivationFlags dwFlags) -> PInvoke.NTSTATUS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.