Hashicorp Vault create encryption key in transit from CLI
#Encryption Key creation from CLI
vault write -f mytransit/keys/my-key
#For encrypting the data in CLI
>>vault write <Transit Engine path>/encrypt/<Created encryption key name> plaintext=$(base64 <<< "My Name is Ankit Sambhare")
#for encryting the data in Powershell
>>vault write mytransit/encrypt/my-key plaintext=$([Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes("My Name is Ankit Sambhare")))
#Use below Website to check your encryption and decryption
https://www.base64decode.org/
#for Decrypting the ciphertext from CLI
>>vault write mytransit/decrypt/my-key ciphertext=vault:v1:Y0W/bCFfDPyl3b+Pqj+GD7+BRcbSYXZpNkAjEAYayhDBRfUDX+w6mfJKps2FLZmvJkoxUreQfmatUevthFNRdAs/lWEULpKmQRgCEr/g
Key Value
--- -----
plaintext TQB5ACAATgBhAG0AZQAgAGkAcwAgAEEAbgBrAGkAdAAgAFMAYQBtAGIAaABhAHIAZQA=
>>base64 --decode <<< "TQB5ACAATgBhAG0AZQAgAGkAcwAgAEEAbgBrAGkAdAAgAFMAYQBtAGIAaABhAHIAZQA=
"
#For decrypting the ciphertext from Powershell 1st command is same
>>vault write mytransit/decrypt/my-key ciphertext=vault:v1:Y0W/bCFfDPyl3b+Pqj+GD7+BRcbSYXZpNkAjEAYayhDBRfUDX+w6mfJKps2FLZmvJkoxUreQfmatUevthFNRdAs/lWEULpKmQRgCEr/g | Out-File .\output
>>[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String("$(Get-Content .\output | select -Skip 2 | Foreach {($_ -split '\s+',4)[1]})"))
Also in C++:
- stop localhost server
- how to clear a port in linux
- how to host angular on github
- scrapy spider shell from spider
- delete local git repository command line creates by react
- protoc-gen-grpc npm
- git exclude nested folder
- how to creare 2 shotcut links of 2 exe in inno
- react typescript testing
- how to install mongodb database in ubuntu version
- github allow large files
- laravel install ubuntu
- psycopg2.OperationalError: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
- introduce parameters to programs in unix
- bash setting home
- how to download terminator in ubuntu
- conda install catboost
- how to install heroku toolbelt on mac
- scale deployment
- git upload folder
- install powershell msi comand
- brew install memcached
- how to set up python virtual environment
- batch rename file