Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat password and sessionkkey arguments as indirect data types
- Loading branch information
1 parent
a2f2069
commit 117117b
Showing
8 changed files
with
134 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
sop-java-picocli/src/test/java/sop/cli/picocli/TestFileUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org> | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package sop.cli.picocli; | ||
|
||
import java.io.File; | ||
import java.io.FileOutputStream; | ||
import java.io.IOException; | ||
import java.nio.charset.StandardCharsets; | ||
import java.nio.file.Files; | ||
|
||
public class TestFileUtil { | ||
|
||
public static File writeTempStringFile(String string) throws IOException { | ||
File tempDir = Files.createTempDirectory("tmpDir").toFile(); | ||
tempDir.deleteOnExit(); | ||
tempDir.mkdirs(); | ||
|
||
File passwordFile = new File(tempDir, "file"); | ||
passwordFile.createNewFile(); | ||
|
||
FileOutputStream fileOut = new FileOutputStream(passwordFile); | ||
fileOut.write(string.getBytes(StandardCharsets.UTF_8)); | ||
fileOut.close(); | ||
|
||
return passwordFile; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters