Skip to content

Commit 7fc04d9

Browse files
committed
Removed IVGenerator (initialization vector)
1 parent 2721519 commit 7fc04d9

File tree

4 files changed

+2
-26
lines changed

4 files changed

+2
-26
lines changed

Crypto.AES/Crypto.AES.psd1

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
Description = 'PowerShell module for cryptography (AES)'
1010
PowerShellVersion = '5.0'
1111
FunctionsToExport = '*'
12-
ScriptsToProcess = @('Public\Classes\IVGenerator.ps1')
1312
PrivateData = @{
1413
PSData = @{
1514
}

Crypto.AES/Public/Classes/IVGenerator.ps1

-11
This file was deleted.

Crypto.AES/Public/New-AesKey.ps1

-1
Original file line numberDiff line numberDiff 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
}

Tests/Crypto.AES.Tests.ps1

+2-13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Import-Module -Name Pester -Force
33
Import-Module .\Crypto.AES\Crypto.AES.psm1 -Force
44

55
Describe '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)

0 commit comments

Comments
 (0)