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
package test; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.nio.charset.StandardCharsets; | |
import java.security.InvalidAlgorithmParameterException; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; |
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
package test; | |
import java.net.InetAddress; | |
import java.net.InetSocketAddress; | |
import java.net.UnknownHostException; | |
/** | |
* Demonstrate that InetAddress#getByName() with a literal does not | |
* fill in the host name, which leads to (uncached) reverse lookups |
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 will format http://openantrag.de/api/proposal/ID/gettop/100 JSON files into CSV | |
# | |
$list = @() | |
foreach($file in Get-ChildItem -Filter proposal-*.json .) { | |
$list += ((Get-Content -Encoding UTF8 $file) -join "`n" | ConvertFrom-Json) | |
} | |
# Inspect Result graphically: PS1> $list | Out-GridView |
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
package net.eckenfels.test.xxe; | |
import java.io.File; | |
import java.io.IOException; | |
import org.xml.sax.Attributes; | |
import org.xml.sax.ContentHandler; | |
import org.xml.sax.DTDHandler; | |
import org.xml.sax.EntityResolver; | |
import org.xml.sax.ErrorHandler; |
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
/* | |
* RenameFiles.java | |
* | |
* created at 2017-07-06 by Bernd Eckenfels <b.eckenfels@seeburger.de> | |
* | |
* License: ASL 2.0 | |
*/ | |
package net.eckenfels.test.javasystemtest; | |
import java.io.IOException; |
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
package net.eckenfels.test.javasystemtest; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.InetSocketAddress; | |
import java.net.ServerSocket; | |
import java.nio.channels.Pipe; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.ExecutorService; |
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
// class name and method names are not Java convention but readable | |
package net.eckenfels.jmhtest; | |
import java.util.concurrent.TimeUnit; | |
import org.openjdk.jmh.annotations.Benchmark; | |
import org.openjdk.jmh.annotations.Fork; | |
import org.openjdk.jmh.annotations.Measurement; | |
import org.openjdk.jmh.annotations.OutputTimeUnit; | |
import org.openjdk.jmh.annotations.Param; |
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
@rem Batch file creates 2 P12 keystores with ECC Certificates (intermediate + root in chain) | |
@del *.pem | |
@del *.csr | |
@del *.crt | |
@del *.p12 | |
@rem -param_enc explicit not possible with Win 7 | |
set NAME=ECC Test |
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
> gpg.exe --verbose --list-keys | |
pub brainpoolP384r1 2017-12-09 [SC] | |
971D76C158AFD6D6AC53205327C195C6F0FB0EDA | |
uid [ ultimativ ] Bernd Eckenfels (test) <ecki@zusammenkunft.net> | |
sub brainpoolP384r1 2017-12-09 [E] | |
> gpg.exe --export-secret-key > unsecret.pgp | |
> gpg.exe --verbose --list-packets unsecret.pgp |
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
package net.eckenfels.test.jmh; | |
import java.nio.ByteBuffer; | |
import java.security.InvalidKeyException; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.concurrent.TimeUnit; | |
import javax.crypto.KeyGenerator; |