Class Base64PublicKeyDecoder

  • All Implemented Interfaces:
    KeyDecoder

    public class Base64PublicKeyDecoder
    extends java.lang.Object
    implements KeyDecoder
    A public key decoder that reads public keys encoded as base64 strings.
    Author:
    Alex Kalderimis
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.security.PublicKey decode​(java.lang.String input)
      Decode the string and make the key.
      • Methods inherited from class java.lang.Object

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

      • Base64PublicKeyDecoder

        public Base64PublicKeyDecoder()
        Construct a new decoder.
    • Method Detail

      • decode

        public java.security.PublicKey decode​(java.lang.String input)
                                       throws DecodingException
        Description copied from interface: KeyDecoder
        Decode the string and make the key.
        Specified by:
        decode in interface KeyDecoder
        Parameters:
        input - The public key, in an encoded form.
        Returns:
        the decoded key.
        Throws:
        DecodingException - If we cannot decode the key.