GostCryptography
GostCryptography copied to clipboard
Ошибка подписания при работе с КриптоПРО
Происходи ошибка:
System.Security.Cryptography.CryptographicException: Error occurred during a cryptographic operation.
в CryptoApiHelper.SignValue(SafeProvHandleImpl providerHandle, SafeHashHandleImpl hashHandle, Int32 keyNumber, Byte[] hashValue)
Конкретно при вычислении размера подписи, в этом кусочке:
if (!CryptoApi.CryptSignHash(hashHandle, (uint)keyNumber, null, 0, null, ref signatureLength))
{
throw CreateWin32Error();
}
Часто повторяется, в чем может быть проблема?