any(DiscoveryInformation.class))) .thenThrow(new MessageException("")) .thenThrow(new AssociationException("")) .thenThrow(new DiscoveryException(""));
setWstFault(constants, response, "Cannot instantiate private association store", e.getMessage()); return;
e.getMessage()); return;
protected byte[] sign(byte[] data) throws AssociationException { try { String algorithm = _macKey.getAlgorithm(); Mac mac = Mac.getInstance(algorithm); mac.init(_macKey); return mac.doFinal(data); } catch (GeneralSecurityException e) { throw new AssociationException("Cannot sign!", e); } }
protected byte[] sign(byte[] data) throws AssociationException { try { String algorithm = _macKey.getAlgorithm(); Mac mac = Mac.getInstance(algorithm); mac.init(_macKey); return mac.doFinal(data); } catch (GeneralSecurityException e) { throw new AssociationException("Cannot sign!", e); } }
protected byte[] sign(byte[] data) throws AssociationException { try { String algorithm = _macKey.getAlgorithm(); Mac mac = Mac.getInstance(algorithm); mac.init(_macKey); return mac.doFinal(data); } catch (GeneralSecurityException e) { throw new AssociationException("Cannot sign!", e); } }
public String sign(String text) throws AssociationException { if (DEBUG) _log.debug("Computing signature for input data:\n" + text); try { String signature = new String(Base64.encodeBase64(sign(text.getBytes("utf-8"))), "utf-8"); if (DEBUG) _log.debug("Calculated signature: " + signature); return signature; } catch (UnsupportedEncodingException e) { throw new AssociationException("Unsupported encoding for signed text.", e); } }
public String sign(String text) throws AssociationException { if (DEBUG) _log.debug("Computing signature for input data:\n" + text); try { String signature = new String(Base64.encodeBase64(sign(text.getBytes("utf-8"))), "utf-8"); if (DEBUG) _log.debug("Calculated signature: " + signature); return signature; } catch (UnsupportedEncodingException e) { throw new AssociationException("Unsupported encoding for signed text.", e); } }
protected byte[] sign(byte[] data) throws AssociationException { try { String algorithm = _macKey.getAlgorithm(); Mac mac = Mac.getInstance(algorithm); mac.init(_macKey); return mac.doFinal(data); } catch (GeneralSecurityException e) { throw new AssociationException("Cannot sign!", e); } }
public String sign(String text) throws AssociationException { if (DEBUG) { _log.debug("Computing signature for input data:\n" + text); } try { String signature = new String(Base64.encodeBase64(sign(text.getBytes("utf-8"))), "utf-8"); if (DEBUG) { _log.debug("Calculated signature: " + signature); } return signature; } catch (UnsupportedEncodingException e) { throw new AssociationException("Unsupported encoding for signed text.", e); } }
public String sign(String text) throws AssociationException { if (DEBUG) _log.debug("Computing signature for input data:\n" + text); try { String signature = new String(Base64.encodeBase64(sign(text.getBytes("utf-8"))), "utf-8"); if (DEBUG) _log.debug("Calculated signature: " + signature); return signature; } catch (UnsupportedEncodingException e) { throw new AssociationException("Unsupported encoding for signed text.", e); } }
public String sign(String text) throws AssociationException { if (DEBUG) _log.debug("Computing signature for input data:\n" + text); try { String signature = new String(Base64.encodeBase64(sign(text.getBytes("utf-8"))), "utf-8"); if (DEBUG) _log.debug("Calculated signature: " + signature); return signature; } catch (UnsupportedEncodingException e) { throw new AssociationException("Unsupported encoding for signed text.", e); } }
protected byte[] sign(byte[] data) throws AssociationException { try { String algorithm = _macKey.getAlgorithm(); Mac mac = Mac.getInstance(algorithm); mac.init(_macKey); return mac.doFinal(data); } catch (GeneralSecurityException e) { throw new AssociationException("Cannot sign!", e); } }
public static Association generate(String type, String handle, int expiryIn) throws AssociationException { if (TYPE_HMAC_SHA1.equals(type)) { return generateHmacSha1(handle, expiryIn); } else if (TYPE_HMAC_SHA256.equals(type)) { return generateHmacSha256(handle, expiryIn); } else { throw new AssociationException("Unknown association type: " + type); } }
public static Association generate(String type, String handle, int expiryIn) throws AssociationException { if (TYPE_HMAC_SHA1.equals(type)) { return generateHmacSha1(handle, expiryIn); } else if (TYPE_HMAC_SHA256.equals(type)) { return generateHmacSha256(handle, expiryIn); } else { throw new AssociationException("Unknown association type: " + type); } }
public Association generate(String type, int expiryIn) throws AssociationException { String tmpHandle = ""; Association tmpAssociation = Association.generate(type, tmpHandle, expiryIn); try { return setHandle(tmpAssociation); } catch (Exception e) { throw new AssociationException("error creating association: " + e.getMessage(), e); } }
public static Association generate(String type, String handle, int expiryIn) throws AssociationException { if (TYPE_HMAC_SHA1.equals(type)) { return generateHmacSha1(handle, expiryIn); } else if (TYPE_HMAC_SHA256.equals(type)) { return generateHmacSha256(handle, expiryIn); } else { throw new AssociationException("Unknown association type: " + type); } }
public static Association generate(String type, String handle, int expiryIn) throws AssociationException { if (TYPE_HMAC_SHA1.equals(type)) { return generateHmacSha1(handle, expiryIn); } else if (TYPE_HMAC_SHA256.equals(type)) { return generateHmacSha256(handle, expiryIn); } else { throw new AssociationException("Unknown association type: " + type); } }
public static Association generate(String type, String handle, int expiryIn) throws AssociationException { if (TYPE_HMAC_SHA1.equals(type)) { return generateHmacSha1(handle, expiryIn); } else if (TYPE_HMAC_SHA256.equals(type)) { return generateHmacSha256(handle, expiryIn); } else { throw new AssociationException("Unknown association type: " + type); } }
throw new AssociationException( "MAC key legth different from shared secret digest length!");