File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -899,6 +899,19 @@ function Set-AzSBackupShare {
899899
900900Export-ModuleMember - Function Set-AzSBackupShare
901901
902+ <#
903+ . SYNOPSIS
904+ Generate encryption key for infrastructure backups
905+ #>
906+ function New-EncryptionKeyBase64 {
907+ $tempEncryptionKeyString = " "
908+ foreach ($i in 1 .. 64 ) { $tempEncryptionKeyString += -join ((65 .. 90 ) + (97 .. 122 ) | Get-Random | % {[char ]$_ }) }
909+ $tempEncryptionKeyBytes = [System.Text.Encoding ]::UTF8.GetBytes($tempEncryptionKeyString )
910+ $BackupEncryptionKeyBase64 = [System.Convert ]::ToBase64String($tempEncryptionKeyBytes )
911+ $BackupEncryptionKeyBase64
912+ }
913+
914+ Export-ModuleMember - Function New-EncryptionKeyBase64
902915
903916function Invoke-AzsInfrastructureAction {
904917 param (
You can’t perform that action at this time.
0 commit comments