List of usage examples for org.bouncycastle.util.encoders HexEncoder encode
public int encode(byte[] data, int off, int length, OutputStream out) throws IOException
From source file:net.ripe.rpki.commons.crypto.util.KeyPairUtil.java
License:BSD License
static String hexEncodeHashData(byte[] keyHashData) { HexEncoder hexEncoder = new HexEncoder(); ByteArrayOutputStream out = new ByteArrayOutputStream(); try {/* w ww . j av a 2 s . c o m*/ hexEncoder.encode(keyHashData, 0, keyHashData.length, out); out.flush(); return out.toString(); } catch (IOException e) { throw new IllegalArgumentException("Exception hex encoding data", e); } }