Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 1.99 KB

Convert-ROT47.README.md

File metadata and controls

73 lines (50 loc) · 1.99 KB

Convert-ROT47

Rotate ascii chars by n places (Caesar cipher).

Description

Rotate ascii chars by n places (Caesar cipher). You can encrypt with the parameter -Encrypt or decrypt with the parameter -Decrypt, depens on what you need. Decryption is selected by default.

Try the parameter -UseAllAsciiChars if you have a string with umlauts which e.g. exist in the German language.

Screenshot

Syntax

.\Convert-ROT47.ps1 [-Text] <String> [[-Rot] <Int32[]>] [[-Decrypt]] [[-UseAllAsciiChars]] [<CommonParameters>]

.\Convert-ROT47.ps1 [-Text] <String> [[-Rot] <Int32[]>] [[-Encrypt]] [[-UseAllAsciiChars]] [<CommonParameters>]

Example 1

PS> .\Convert-ROT47.ps1 -Text "This is an encrypted string!" -Rot 7 -Encrypt

Rot Text
--- ----
  7 [opz pz hu lujy"w{lk z{ypun(

Example 2

PS> .\Convert-ROT47.ps1 -Text '[opz pz hu lujy"w{lk z{ypun(' -Rot (5..10)

Rot Text
--- ----
  5 Vjku ku cp gpet{rvgf uvtkpi#
  6 Uijt jt bo fodszqufe tusjoh"
  7 This is an encrypted string!
  8 Sghr hr `m dmbqxosdc rsqhmf~
  9 Rfgq gq _l clapwnrcb qrpgle}
 10 Qefp fp ^k bk`ovmqba pqofkd|

Example 3

PS> .\Convert-ROT47.ps1 -Text "Beispiel: Cäsar-Verschlüsselung - Sprache Deutsch!" -Rot 3 -UseAllAsciiChars -Encrypt

Rot Text
--- ----
  3 Ehlvslho= Fçvdu0Yhuvfkoÿvvhoxqj 0 Vsudfkh Ghxwvfk$

Example 4

PS> .\Convert-ROT47.ps1 -Text "Ehlvslho= Fçvdu0Yhuvfkoÿvvhoxqj 0 Vsudfkh Ghxwvfk$" -Rot (1..4) -UseAllAsciiChars

Rot Text
--- ----
  1 Dgkurkgn< Eæuct/Xgtuejnþuugnwpi / Urtcejg Fgwvuej#
  2 Cfjtqjfm; Dåtbs.Wfstdimýttfmvoh . Tqsbdif Efvutdi"
  3 Beispiel: Cäsar-Verschlüsselung - Sprache Deutsch!
  4 Adhrohdk9 Bãr`q,Udqrbgkûrrdktmf , Roq`bgd Cdtsrbg

Further information