-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/permanent keys storage #28
Conversation
To develop use Symbolic Links
…irAndros/KeePassWinHello into feature/permanent-keys-storage
Actualized description
default: | ||
throw new ExternalException("External error occurred", value); | ||
ngcKeyHandle.Close(); | ||
DeletePersistentKey(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
мб не переоткрывать хэндл, а вызвать напрямую NCryptDeleteKey
|
||
int cacheType = 0; | ||
NCryptGetProperty(ngcKeyHandle, NCRYPT_NGC_CACHE_TYPE_PROPERTY, ref cacheType, sizeof(int), out pcbResult, CngPropertyOptions.None).CheckStatus(); | ||
if (cacheType == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment "zero" meaning
{ | ||
_randomSeedBits = 256; | ||
_encryptionIV = CryptoRandom.Instance.GetRandomBytes(16); | ||
_encryptionIV = new byte[16]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be const initial value (no all zero)
long lowDateTime = (uint)ncred.LastWritten.dwLowDateTime; | ||
|
||
var createdDate = DateTime.FromFileTime(highDateTime | lowDateTime); | ||
if (DateTime.Now - createdDate >= Settings.Instance.InvalidatingTime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think about Utc
Implemented new Windows Credential Manager storage (#7)