EncryptCredential
0.3.0
Execute commands like
"Hello World" | Convert-PlaintextToSecure
to get a string like
76492d1116743f0423413b16050a5345MgB8AEEAYQBmAEEAOABPAEEAYQBmAEYAKwBuAGQAegBxACsASQBRAGIAaQA0AEEAPQA9AHwANAAxAGEAYQBhADAAYwA3ADQAYwBiADkAYwAzADEAZgBkAGUAZQBkADQAOABhADIAMgA5AGUAMAAyADkANwBiADcAMQAyADgAOAAzADkAMwBiADA
Execute commands like
"Hello World" | Convert-PlaintextToSecure
to get a string like
76492d1116743f0423413b16050a5345MgB8AEEAYQBmAEEAOABPAEEAYQBmAEYAKwBuAGQAegBxACsASQBRAGIAaQA0AEEAPQA9AHwANAAxAGEAYQBhADAAYwA3ADQAYwBiADkAYwAzADEAZgBkAGUAZQBkADQAOABhADIAMgA5AGUAMAAyADkANwBiADcAMQAyADgAOAAzADkAMwBiADAANAA0ADcAMwA3ADQANgAxADMAYwBmADQAZQAyADIAMwBkAGQAMQBhADUAMAA=
This string can be decrypted by calling
"76492d1116743f0423413b16050a5345MgB8AEEAYQBmAEEAOABPAEEAYQBmAEYAKwBuAGQAegBxACsASQBRAGIAaQA0AEEAPQA9AHwANAAxAGEAYQBhADAAYwA3ADQAYwBiADkAYwAzADEAZgBkAGUAZQBkADQAOABhADIAMgA5AGUAMAAyADkANwBiADcAMQAyADgAOAAzADkAMwBiADAANAA0ADcAMwA3ADQANgAxADMAYwBmADQAZQAyADIAMwBkAGQAMQBhADUAMAA=" | Convert-SecureToPlaintext
and get back
Hello World
You better save the strings into variables ;-)
This module is used to double encrypt sensitive data like credentials, tokens etc. They cannot be stolen pretty easily as it uses SecureStrings.
At the first encryption or when calling Export-Keyfile a new random keyfile will be generated for salting with AES.
The key ist saved per default in your users profile, but can be exported into any other folder and use it from there.
Be aware that the encrypted strings are only valid for the executing machine as it uses SecureStrings that cannot be
copied over to other machines.
You can use `Import-Keyfile` to use a keyfile that has been exported before.
Minimum PowerShell version
5.1
Installation Options
Owners
Copyright
(c) 2026 Apteco GmbH. All rights reserved.
Package Details
Author(s)
- florian.von.bracht@apteco.de
Tags
powershell Windows Linux Apteco
Functions
Convert-PlaintextToSecure Convert-SecureToPlaintext Export-Keyfile Import-Keyfile New-Keyfile
PSEditions
Dependencies
This module has no dependencies.
Release Notes
0.3.0 Reworked the module with Claude AI to be more secure and robust, now using another way to create
a keyfile for salting. The old encryption method is still supported, so all
previously encrypted strings will stay valid UNTIL you call New-Keyfile. After that,
please re-encrypt all your credentials.
Added ACL and linux file permission handling for the keyfile.
Dispose the used AES object after encryption/decryption for better security.
Changed internal functions verbs for more consistency
Updated the copyright year to 2026
0.2.0 Tested successfully Linux support
0.1.2 Updated copyright to 2025
0.1.1 Bumped the copyright year to 2024
0.1.0 Making this module more mature with only explicit functions to export
Removing not needed verbose output, use -verbose to see it again
Fixed the path joining
0.0.2 Fixed a bug regarding output if a keyfile does not exist
0.0.1 Initial release through PSGallery
FileList
- EncryptCredential.nuspec
- EncryptCredential.psd1
- EncryptCredential.psm1
- Private\ConvertTo-CryptedOrbitPassword.ps1
- Private\New-KeyfileRaw.ps1
- Private\Read-Keyfile.ps1
- Public\Convert-PlaintextToSecure.ps1
- Public\Convert-SecureToPlaintext.ps1
- Public\Export-Keyfile.ps1
- Public\Import-Keyfile.ps1
- Public\New-Keyfile.ps1