File tree Expand file tree Collapse file tree 4 files changed +2
-26
lines changed Expand file tree Collapse file tree 4 files changed +2
-26
lines changed Original file line number Diff line number Diff line change 99 Description = ' PowerShell module for cryptography (AES)'
1010 PowerShellVersion = ' 5.0'
1111 FunctionsToExport = ' *'
12- ScriptsToProcess = @ (' Public\Classes\IVGenerator.ps1' )
1312 PrivateData = @ {
1413 PSData = @ {
1514 }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ function New-AesKey {
1919 $aes = New-AesManagedObject
2020 $aes.GenerateKey ()
2121
22-
2322 if ($Format -eq [AesKeyFormat ]::String) {
2423 [System.Convert ]::ToBase64String($aes.Key )
2524 }
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ Import-Module -Name Pester -Force
33Import-Module .\Crypto.AES\Crypto.AES.psm1 - Force
44
55Describe ' Crypto.AES.Tests' {
6+ $encoding = [System.Text.UTF8Encoding ]::new()
7+
68 Context " AES key generation" {
79 It " Should return key as string - default" {
810 New-AesKey | Should - BeOfType [String ]
@@ -15,19 +17,6 @@ Describe 'Crypto.AES.Tests' {
1517 }
1618 }
1719
18- Context " IVGenerator" {
19- $obj = [IVGenerator ]::new()
20- $v1 = $obj.GenerateIV ()
21- $v2 = $obj.GenerateIV ()
22-
23- It " Should return valid type" {
24- $v1 -is [System.Byte []] | Should - BeTrue
25- }
26- It " Should generate unique keys" {
27- $v1 | Should -Not - Be $v2
28- }
29- }
30-
3120 Context " Protect-Data - Result" {
3221 $Key = [byte []]::new(32 )
3322 $nonce = [byte []]::new(12 )
You can’t perform that action at this time.
0 commit comments