Interface PublicKeySource

  • All Known Implementing Classes:
    KeyStorePublicKeySource

    public interface PublicKeySource
    An object that can provide public keys by name, or all known keys, or a subset of keys.
    Author:
    Alex Kalderimis
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.security.PublicKey get​(java.lang.String name)
      Get a specific key by name.
      java.util.Collection<java.security.PublicKey> getAll()  
      java.util.Collection<java.security.PublicKey> getSome​(java.lang.String... names)
      Get multiple keys given a set of names.
    • Method Detail

      • get

        java.security.PublicKey get​(java.lang.String name)
                             throws KeySourceException
        Get a specific key by name.
        Parameters:
        name - The name of the key.
        Returns:
        The key.
        Throws:
        KeySourceException - If we can't get that key.
      • getAll

        java.util.Collection<java.security.PublicKey> getAll()
                                                      throws KeySourceException
        Returns:
        All the keys in this key source.
        Throws:
        KeySourceException - If we have issues getting any of them.
      • getSome

        java.util.Collection<java.security.PublicKey> getSome​(java.lang.String... names)
                                                       throws KeySourceException
        Get multiple keys given a set of names.
        Parameters:
        names - The names of the keys we want.
        Returns:
        The matching keys.
        Throws:
        KeySourceException - If we can't get any of the keys.