docs: public static PublicKey decodePublicKey(String encodedKey) {
          String base64 = encodedKey;
  
          // Strip begin and end markers if present.
          // Previous versions of Cryptolite did not add these markers.
          String BEGIN = "-----BEGIN PUBLIC KEY-----";
          String END = "-----END PUBLIC KEY-----";
          int beginIndex = StringUtils.indexOf(base64, BEGIN);
          int endIndex = StringUtils.indexOf(base64, END);
          if (beginIndex > -1 && endIndex > -1) {
              base64 = StringUtils.substring(base64, beginIndex + BEGIN.length(), endIndex).trim();
          }
  
          // Thinking about doing something for ssh public keys:
          String openSshMarker = "ssh-rsa";
          if (StringUtils.startsWith(base64, openSshMarker)) {
  
              throw new RuntimeException("Cryptolite doesn't currently support OpenSSH key format. Feel free to open an issue if this is important to you.");
              //Scanner scanner = new Scanner(base64);
              //scanner.next(); // skip the marker
              //base64 = scanner.next();
              //System.out.println("base64 = " + base64);
              //PemReader reader = new PemReader(new StringReader(base64));
              //try {
              //    PemObject pemObject = reader.readPemObject();
              //    System.out.println("pemObject = " + pemObject);
              //    return null; // We always seem to get null from the reader.
              //} catch (IOException e) {
              //    e.printStackTrace();
              //}
          }
  
          // Get a key factory
          byte[] bytes = ByteArray.fromBase64(base64);
          KeyFactory keyFactory;
          try {
              keyFactory = KeyFactory.getInstance(Keys.ASYMMETRIC_ALGORITHM);
          } catch (NoSuchAlgorithmException e) {
              if (SecurityProvider.addProvider()) {
                  return decodePublicKey(encodedKey);
              } else {
                  throw new IllegalStateException("Algorithm unavailable: " + Keys.ASYMMETRIC_ALGORITHM, e);
              }
          }
  
          // Decode the key
          try {
              return keyFactory.generatePublic(new X509EncodedKeySpec(bytes));
          } catch (InvalidKeySpecException e) {
              throw new IllegalArgumentException("Unable to convert key '" + encodedKey + "' to a valid public key.", e);
          }
      }