The argument must be the full path and filename to a PEM file located anywhere in your local hard drive or classpath. Create PemFile class to encapsulate PEM file I/O operationsĬreate the PemFile class and add a constructor that accepts a string as argument to initialize a PemObject attribute ( line 14).
4.0.0 bouncycastle-pem-read 0.0.1-SNAPSHOT org.bouncycastle bcprov-jdk15on 1.51 log4j log4j 1.2.17 pom.xml 3. In the snippet below, we also added the log4j dependency to print some debug traces in our program. That said, the first step is to edit the pom file and add the Bounc圜astle dependency.
I suggest you as homework to merge both projects together. Configure the POM fileĪlthough we could have just evolved the bouncycastle-rsa-pem-write project, we have opted for creating a new one to add the new functionality. Import the project into your favourite IDE and let’s get down to work. Mvn archetype:generate -DgroupId = -DartifactId =bouncycastle-pem-read -DarchetypeArtifactId =maven-archetype-quickstart -DinteractiveMode = false