Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Why the 512-byte length limit on passwords? #17

Open
adobeDan opened this issue May 23, 2017 · 1 comment
Open

Why the 512-byte length limit on passwords? #17

adobeDan opened this issue May 23, 2017 · 1 comment

Comments

@adobeDan
Copy link

I would like to use CredentialManager to save PEM-format RSA private key data (typically a few thousand bytes), but there is an explicit 512-char length limit in the module code. Is that from an underlying Window Credential Manager limitation?

@jrwarwick
Copy link

At a glance, it looks to me like the password with this limitation is stored in a "SecureString":
https://github.com/xxbiohazrdxx/PowerShell_Credential_Manager/blob/master/PSCredentialManager.Cmdlet/Cmdlets.cs#L219
and seemingly "The maximum length of a SecureString instance is 65,536 characters." https://docs.microsoft.com/en-us/dotnet/api/system.security.securestring?view=net-5.0#remarks
If I have my facts straight, then: no is not an underlying limitation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants