/// <summary> /// Подпись хэша. /// </summary> /// <param name="hash">Хэш.</param> /// <param name="keyNumber">Тип ключа.</param> /// <returns>Подпись хэша.</returns> public byte[] SignHash(byte[] hash, KeyNumber keyNumber) { using (HashContext hashContext = CreateHash(null, Constants.CpcspHashId, 0)) { hashContext.SetHashParameter(Constants.HpHashValue, hash, 0); return(hashContext.SignHash(keyNumber, 0)); } }