return timestampReplayCache;
}
private synchronized ReplayCache createCache(String key) throws WSSecurityException {
ReplayCacheFactory replayCacheFactory = ReplayCacheFactory.newInstance();
byte[] nonceValue;
try {
nonceValue = WSSConstants.generateBytes(10);
String cacheKey = key + Base64.encode(nonceValue);
return replayCacheFactory.newReplayCache(cacheKey, null);
} catch (XMLSecurityException e) {
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, e);
}
}