Skip to content

Instantly share code, notes, and snippets.

View Arnaud-Chevalier's full-sized avatar

CHEVALIER-INFO Arnaud-Chevalier

View GitHub Profile
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$Form = New-Object System.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(600,270)
$Form.Text = "Caesar Cipher Decryption"
$Form.ShowIcon = $False
###Function used to decrypt the text
function Decrypt {
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$Form = New-Object System.Windows.Forms.Form
$Form.Size = New-Object System.Drawing.Size(600,270)
$Form.Text = "Caesar Cipher Encryption"
$Form.ShowIcon = $False
###Function used to encrypt the text
function Encrypt {
###################
#Encrypt
###################
#Message to encrypt
$text = "titi a cru voir un grosminet"
#Shift number
$i = 3
#Function to calculate the Collatz conjecture
Function Calc ($number) {
#If number is even divide by 2
if ($number % 2 -eq 0){
$result = $number / 2
[void]$myArray.Add($result)
#Else (number is odd) multiply by 3 and add 1
}Else{
$result = $number * 3 + 1
[void]$myArray.Add($result)
###############################################################################################################
#############################################Modify $SiteURL and $FolderSiteRelativeURL #######################
###############################################################################################################
#Your SharePoint site
$SiteURL = "https://yourtenant.sharepoint.com/sites/yoursite"
#Your folder
$FolderSiteRelativeURL = "/yourlibrary/rootfolder/subfolder"