/** * Returns a digest of a specified key * * @param key the key * @return the digest */ public static byte[] generateKeyID(Key key) { if (null == key) return null; return NDNDigestHelper.digest(key.getEncoded()); }
/** * Returns a digest of a specified key * * @param key the key * @return the digest */ public static byte[] generateKeyID(byte[] key) { return NDNDigestHelper.digest(key); }