Interface KeyPairProvider

  • All Known Subinterfaces:
    Crypto
    All Known Implementing Classes:
    EdDsaCrypto

    public interface KeyPairProvider
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.security.KeyPair generateKeyPair()
      Generates a new key pair for this crypto.
      java.lang.String serialize​(java.security.Key key)
      Returns a serialized representation of the specified key.
      java.security.PrivateKey toPrivateKey​(java.lang.String serialized)
      Converts the provided serialized key into a private key.
      java.security.PublicKey toPublicKey​(java.lang.String serialized)
      Converts the provided serialized key into a public key.
    • Method Detail

      • generateKeyPair

        java.security.KeyPair generateKeyPair()
        Generates a new key pair for this crypto.
        Returns:
        the generated key pair
      • serialize

        java.lang.String serialize​(java.security.Key key)
        Returns a serialized representation of the specified key.
        Parameters:
        key - the key to serialize
        Returns:
        the serialized key
      • toPublicKey

        java.security.PublicKey toPublicKey​(java.lang.String serialized)
        Converts the provided serialized key into a public key.
        Parameters:
        serialized - the serialized key
        Returns:
        a public key
      • toPrivateKey

        java.security.PrivateKey toPrivateKey​(java.lang.String serialized)
        Converts the provided serialized key into a private key.
        Parameters:
        serialized - the serialized key
        Returns:
        a private key