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
@echo off | |
rem install angular cli if not already done | |
npm install -g @angular/cli | |
rem create workspace with routing module and not interaction | |
ng new webapp --routing --defaults | |
rem enter workspace | |
cd webapp |
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
// For more information see: https://stackoverflow.com/questions/2897619/using-html5-javascript-to-generate-and-save-a-file | |
var pom = document.createElement('a'); | |
pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent('hello world!')); | |
pom.setAttribute('download', 'test.txt'); | |
if (document.createEvent) { | |
var event = document.createEvent('MouseEvents'); | |
event.initEvent('click', true, true); | |
pom.dispatchEvent(event); | |
} |
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 de.wolff.wsst; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.Arrays; | |
import java.util.Properties; | |
import java.util.regex.Pattern; |
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 de.wolff.wsst; | |
import java.io.File; | |
import java.util.Properties; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import javax.xml.soap.MessageFactory; | |
import javax.xml.soap.SOAPMessage; | |
import org.apache.wss4j.common.crypto.Crypto; |
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 # create a new self signed certificate insite the keystore bob.jks. This will act as issuer for the other certificate | |
rem # It is importent to add the extention BasicConstraints Certificate Authority (bc:c) | |
rem # Otherwise tools like the JVM will not accept other certificates issued by this | |
keytool -genkey -alias bob -keyalg RSA -keypass changeit -storepass changeit -keystore bob.jks -dname CN=bob -ext bc:c | |
rem # create a other self siged certificate for with we will create a Certificate Sign Request (CSR) | |
keytool -genkey -alias alice -keyalg RSA -keypass changeit -storepass changeit -keystore alice.jks -dname CN=alice |
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 de.wolff.dsi; | |
public interface DynamicService { | |
String invoke(); | |
} |
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
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.security.KeyFactory; | |
import java.security.PublicKey; | |
import java.security.Signature; | |
import java.security.spec.X509EncodedKeySpec; | |
public class MessageSignVerifier { |
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
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.security.KeyPair; | |
import java.security.KeyPairGenerator; | |
import java.security.PrivateKey; | |
import java.security.SecureRandom; | |
import java.security.Signature; |
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
import java.io.FileOutputStream; | |
import java.io.OutputStream; | |
import java.security.InvalidKeyException; | |
import java.security.Key; | |
import java.security.NoSuchAlgorithmException; | |
import javax.crypto.Cipher; | |
import javax.crypto.CipherOutputStream; | |
import javax.crypto.NoSuchPaddingException; |
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
import java.io.ByteArrayOutputStream; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.security.InvalidKeyException; | |
import java.security.Key; | |
import java.security.NoSuchAlgorithmException; |
NewerOlder