Skip to content

Commit 89db226

Browse files
committed
Add Expand-Data function to process AES payloads
1 parent ce3f0dc commit 89db226

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Crypto.AES/Public/Expand-Data.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function Expand-Data {
2+
param (
3+
[Parameter(Mandatory = $true, Position = 0 )]
4+
[byte[]]$Payload
5+
)
6+
$size = $Payload.Length - 12 - 1
7+
@{
8+
tag = $Payload[0..15]
9+
data = $Payload[16..$size]
10+
nonce = $Payload[($size + 1)..$Payload.Length]
11+
}
12+
}

0 commit comments

Comments
 (0)