java.lang.Object
org.apache.sshd.common.util.security.eddsa.generic.EdDSAUtils

public final class EdDSAUtils extends Object
Utilities to extract the raw key bytes from ed25519 or ed448 public keys, in a manner that is independent of the actual concrete key implementation classes.
Author:
Apache MINA SSHD Project
  • Method Details

    • getBytes

      public static byte[] getBytes(PublicKey key) throws InvalidKeyException
      Retrieves the raw key bytes from an ed25519 or ed448 PublicKey.
      Parameters:
      key - PublicKey to get the bytes of
      Returns:
      the raw key bytes
      Throws:
      InvalidKeyException - if the key is not an ed25519 or ed448 key, or if it doesn't use X.509 encoding