Java tutorial
//package com.java2s; import java.security.Key; public class Main { /** * Returns true if the key is an elliptic curve public or private key. */ public static boolean isEcKey(Key key) { return "EC".equals(key.getAlgorithm()); } }