public void convertFileToBase64() {
String path = this.getClass().getClassLoader().getResource("10012312135.pfx").getPath();
try {
byte[] b = Files.toByteArray(new File(path));
System.out.println(Base64.encodeBase64String(b));
} catch (IOException e) {
e.printStackTrace();
}
}