Skip to content

Instantly share code, notes, and snippets.

View hsellik's full-sized avatar

Hendrig Sellik hsellik

View GitHub Profile
@hsellik
hsellik / PKCS11.java
Last active February 2, 2021 08:13
Example on how to use YubiHSM 2 with Java
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import java.io.IOException;
import java.security.*;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Enumeration;