com.ning.http.client.oauth
Class ThreadSafeHMAC

java.lang.Object
  extended by com.ning.http.client.oauth.ThreadSafeHMAC

public class ThreadSafeHMAC
extends Object

Since cloning (of MAC instances) is not necessarily supported on all platforms (and specifically seems to fail on MacOS), let's wrap synchronization/reuse details here. Assumption is that this is bit more efficient (even considering synchronization) than locating and reconstructing instance each time. In future we may want to use soft references and thread local instance.

Author:
tatu (tatu.saloranta@iki.fi)

Constructor Summary
ThreadSafeHMAC(ConsumerKey consumerAuth, RequestToken userAuth)
           
 
Method Summary
 byte[] digest(byte[] message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadSafeHMAC

public ThreadSafeHMAC(ConsumerKey consumerAuth,
                      RequestToken userAuth)
Method Detail

digest

public byte[] digest(byte[] message)


Copyright © 2011. All Rights Reserved.