Commit 20316fc
authored
🩹 [Patch]: Support pipeline input on
## Description
This pull request enhances the `Sodium` PowerShell module by adding
support for pipeline input to various functions, updating documentation,
and adding new tests to ensure proper functionality. The most important
changes include the addition of pipeline input support, updates to
function documentation, and new tests for pipeline input scenarios.
Enhancements to functions:
*
[`src/functions/public/ConvertFrom-SodiumSealedBox.ps1`](diffhunk://#diff-afea5aa86ab4622c3a4bff63aa61976494cb620d338df534bf7121018056bbadL30-R56):
Added support for `ValueFromPipeline` and
`ValueFromPipelineByPropertyName` to the `SealedBox` parameter.
*
[`src/functions/public/ConvertTo-SodiumSealedBox.ps1`](diffhunk://#diff-be3e1727721972ed3d4275a880537b89ce6fbb16c1d97405e02d7e798b6c7bfbL25-R50):
Added support for `ValueFromPipeline` and
`ValueFromPipelineByPropertyName` to the `Message` parameter.
*
[`src/functions/public/New-SodiumKeyPair.ps1`](diffhunk://#diff-b951668ffde5fc1b700af8f8b2b6076d7ce27b0ec23e9d556ad1a893e204c87bL51-R82):
Added support for `ValueFromPipeline` to the `Seed` parameter.
Documentation updates:
*
[`src/functions/public/ConvertFrom-SodiumSealedBox.ps1`](diffhunk://#diff-afea5aa86ab4622c3a4bff63aa61976494cb620d338df534bf7121018056bbadR18-R41):
Enhanced documentation with examples, outputs, and notes for better
clarity.
*
[`src/functions/public/ConvertTo-SodiumSealedBox.ps1`](diffhunk://#diff-be3e1727721972ed3d4275a880537b89ce6fbb16c1d97405e02d7e798b6c7bfbL11-R35):
Enhanced documentation with examples, outputs, and notes for better
clarity.
*
[`src/functions/public/New-SodiumKeyPair.ps1`](diffhunk://#diff-b951668ffde5fc1b700af8f8b2b6076d7ce27b0ec23e9d556ad1a893e204c87bR40-R62):
Enhanced documentation with examples, outputs, and notes for better
clarity.
New tests:
*
[`tests/Sodium.Tests.ps1`](diffhunk://#diff-f601c73f9a5c51929710c76b4065f37025d3704dae0b299be2a892f7702e6875R66-R94):
Added tests to verify encryption and decryption using pipeline input for
`ConvertTo-SodiumSealedBox` and `ConvertFrom-SodiumSealedBox`.
*
[`tests/Sodium.Tests.ps1`](diffhunk://#diff-f601c73f9a5c51929710c76b4065f37025d3704dae0b299be2a892f7702e6875R116-R124):
Added tests to verify deterministic key generation using pipeline input
for `New-SodiumKeyPair`.
## Type of change
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [ ] 📖 [Docs]
- [ ] 🪲 [Fix]
- [x] 🩹 [Patch]
- [ ] ConvertTo- and ConvertFrom-SodiumSealedBox and New-SodiumKeyPair (#24)1 parent a372daa commit 20316fc
4 files changed
Lines changed: 121 additions & 5 deletions
File tree
- src/functions/public
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
20 | 42 | | |
21 | 43 | | |
22 | 44 | | |
| |||
27 | 49 | | |
28 | 50 | | |
29 | 51 | | |
30 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
31 | 57 | | |
32 | 58 | | |
33 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
15 | 36 | | |
16 | 37 | | |
17 | 38 | | |
| |||
22 | 43 | | |
23 | 44 | | |
24 | 45 | | |
25 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
26 | 51 | | |
27 | 52 | | |
28 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
40 | 63 | | |
41 | 64 | | |
42 | 65 | | |
| |||
48 | 71 | | |
49 | 72 | | |
50 | 73 | | |
51 | | - | |
| 74 | + | |
52 | 75 | | |
53 | 76 | | |
54 | 77 | | |
55 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
56 | 83 | | |
57 | 84 | | |
58 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
66 | 95 | | |
67 | 96 | | |
68 | 97 | | |
| |||
84 | 113 | | |
85 | 114 | | |
86 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
87 | 125 | | |
88 | 126 | | |
89 | 127 | | |
| |||
0 commit comments