Class EdDsaCrypto

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] encode​(java.security.Key key)
      Returns a binary representation of the key.
      java.security.KeyPair generateKeyPair()
      Generates a new key pair for this crypto.
      java.lang.String getAlgorithm()
      Returns the Java name of the algorithm used by this crypto.
      java.lang.String serialize​(java.security.Key key)
      Returns a serialized representation of the specified key.
      Signer signer​(java.lang.String keyId, java.security.PrivateKey privateKey)
      Creates a new signer using 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.
      Verifier verifier​(java.security.PublicKey publicKey)
      Creates a new verifier using the specified public key.
      • Methods inherited from class java.lang.Object

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

      • getAlgorithm

        public java.lang.String getAlgorithm()
        Description copied from interface: Crypto
        Returns the Java name of the algorithm used by this crypto.
        Returns:
        the algorithm
      • encode

        public byte[] encode​(java.security.Key key)
        Returns a binary representation of the key.
        Parameters:
        key - the key to encode
        Returns:
        an encoded key
      • toPublicKey

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

        public java.security.PrivateKey toPrivateKey​(java.lang.String serialized)
        Description copied from interface: KeyPairProvider
        Converts the provided serialized key into a private key.
        Parameters:
        serialized - the serialized key
        Returns:
        a private key
      • generateKeyPair

        public java.security.KeyPair generateKeyPair()
        Description copied from interface: KeyPairProvider
        Generates a new key pair for this crypto.
        Returns:
        the generated key pair
      • signer

        public Signer signer​(java.lang.String keyId,
                             java.security.PrivateKey privateKey)
        Description copied from interface: Crypto
        Creates a new signer using the specified key.
        Specified by:
        signer in interface Crypto
        Parameters:
        keyId - the id of the key used
        privateKey - the private key to be used
        Returns:
        a signer
      • verifier

        public Verifier verifier​(java.security.PublicKey publicKey)
        Description copied from interface: Crypto
        Creates a new verifier using the specified public key.
        Specified by:
        verifier in interface Crypto
        Parameters:
        publicKey - the public key to be used
        Returns:
        a verifier
      • serialize

        public java.lang.String serialize​(java.security.Key key)
        Description copied from interface: KeyPairProvider
        Returns a serialized representation of the specified key.
        Specified by:
        serialize in interface KeyPairProvider
        Parameters:
        key - the key to serialize
        Returns:
        the serialized key