List of usage examples for org.apache.commons.codec.binary Hex encodeHexString
public static String encodeHexString(byte[] data)
From source file:ee.sk.hwcrypto.demo.signature.TestSigningData.java
public static String getSigningCertificateInHex() { try {//from w w w. j ava2s . c o m X509Certificate certificate = getSigningCert(); byte[] derEncodedCertificate = certificate.getEncoded(); String hexString = Hex.encodeHexString(derEncodedCertificate); return hexString; } catch (Exception e) { throw new RuntimeException("Certificate loading failed", e); } }
From source file:ch.cyberduck.core.io.SHA512ChecksumCompute.java
@Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha512, Hex.encodeHexString(this.digest("SHA-512", in))); }
From source file:com.alliander.osgp.dto.valueobjects.smartmetering.SetKeysRequestDto.java
@Override public String toString() { return "KeySet [authenticationKey=" + Hex.encodeHexString(this.authenticationKey) + ", encryptionKey=" + Hex.encodeHexString(this.encryptionKey) + "]"; }
From source file:com.themodernway.server.core.security.SimpleHexEncoder.java
@Override public String encode(final byte[] src) { return Hex.encodeHexString(src); }
From source file:fi.ilmoeuro.membertrack.util.Crypto.java
public static String randomSalt() { byte[] randomBytes = new byte[32]; SecureRandom random = new SecureRandom(); random.nextBytes(randomBytes);/* w w w . ja v a 2 s . c o m*/ String salt = Hex.encodeHexString(randomBytes); return salt; }
From source file:com.antisleuthsecurity.asc_api.cryptography.hashes.hash.Hasher.java
public String getHashAsString(String content) throws AscException { return Hex.encodeHexString(hash(content)); }
From source file:eu.pursuit.core.ItemName.java
@Override public String toString() { return scopeId.toString() + "/" + Hex.encodeHexString(rendezvousId.getId()); }
From source file:ch.cyberduck.core.io.MD5ChecksumCompute.java
@Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.md5, Hex.encodeHexString(this.digest("MD5", in))); }
From source file:ch.cyberduck.core.io.SHA1ChecksumCompute.java
@Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha1, Hex.encodeHexString(this.digest("SHA-1", in))); }
From source file:ch.cyberduck.core.io.SHA256ChecksumCompute.java
@Override public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException { return new Checksum(HashAlgorithm.sha256, Hex.encodeHexString(this.digest("SHA-256", in))); }