Class PemUtil


  • public final class PemUtil
    extends java.lang.Object
    Utility class for parsing PEM keys.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.security.spec.EncodedKeySpec parsePemToKeySpec​(java.io.BufferedReader reader)
      Parses a single key from reader.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • parsePemToKeySpec

        @Nullable
        public static java.security.spec.EncodedKeySpec parsePemToKeySpec​(java.io.BufferedReader reader)
        Parses a single key from reader.

        For private keys, it will return a PKCS8EncodedKeySpec. For public keys, it will return a X509EncodedKeySpec.