Code example for PublicKey

Methods: getAlgorithm

  public PublicKey getKey() {
    return logKey;
  public String getSignatureAlgorithm() {
    return logKey.getAlgorithm();
  public boolean isSameLogId(byte[] idToCheck) {
    return Arrays.equals(getID(), idToCheck);
  private static byte[] calculateLogId(PublicKey logKey) {
    try { 
      MessageDigest sha256 = MessageDigest.getInstance("SHA-256");
      return sha256.digest();
    } catch (NoSuchAlgorithmException e) {
      throw new UnsupportedCryptoPrimitiveException("Missing SHA-256", e);
Connect your IDE to all the code out there  Get Codota for Java