PowerCenter
- PowerCenter 10.4.0
- Todos os produtos
public static String oasisDigest(String password, String nonce) throws Exception{ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); String created = sdf.format(new Date()); System.out.println("Created : " + created); System.out.println("Nonce : " + new String(org.apache.commons.codec.binary.Base64.encodeBase64(nonce.getBytes()))); String toDigest = nonce + created + password; MessageDigest digest = java.security.MessageDigest.getInstance("SHA-1"); digest.reset(); digest.update(toDigest.getBytes()); byte[] hash = digest.digest(); return new String(org.apache.commons.codec.binary.Base64.encodeBase64(hash)); }