any(DiscoveryInformation.class))) .thenThrow(new MessageException("")) .thenThrow(new AssociationException("")) .thenThrow(new DiscoveryException(""));
public static boolean isDhSupported(AssociationSessionType type) { String hAlg = type.getHAlgorithm(); if (hAlg == null) // no encryption sessions return true; else return isDhShaSupported(hAlg); }
public static Association createHmacSha1(String handle, byte[] macKeyBytes, int expiryIn) { SecretKey macKey = createMacKey(HMAC_SHA1_ALGORITHM, macKeyBytes); return new Association(TYPE_HMAC_SHA1, handle, macKey, expiryIn); }
/** * Is association valid. * * @param association the association * @return the boolean */ protected boolean isAssociationValid(final Association association) { return association != null && !association.hasExpired(); } }
public static boolean isDhSha256Supported() { return isDhShaSupported(H_ALGORITHM_SHA256); } }
/** * Returns true if the specified argument's encryption level is considered * better than the one of the current instance. */ public boolean isBetter(AssociationSessionType other) { return this.compareTo(other) > 0; }
/** * Creates a OpenID 2 AssociationSessionType with the specified session type * and HMAC-SHA1 association type. * * @param sessType The session type. */ public static AssociationSessionType create(String sessType) throws AssociationException { return create(sessType, Association.TYPE_HMAC_SHA1); }
public static Association createHmacSha1(String handle, byte[] macKeyBytes, int expiryIn) { SecretKey macKey = createMacKey(HMAC_SHA1_ALGORITHM, macKeyBytes); return new Association(TYPE_HMAC_SHA1, handle, macKey, expiryIn); }
public static boolean isDhSupported(AssociationSessionType type) { String hAlg = type.getHAlgorithm(); if (hAlg == null) // no encryption sessions return true; else return isDhShaSupported(hAlg); }
public static boolean isDhSha256Supported() { return isDhShaSupported(H_ALGORITHM_SHA256); } }
/** * Returns true if the specified argument's encryption level is considered * better than the one of the current instance. */ public boolean isBetter(AssociationSessionType other) { return this.compareTo(other) > 0; }
/** * Creates a OpenID 2 AssociationSessionType with the specified session and * association types. * * @param sessType The session type. * @param assocType The association type. */ public static AssociationSessionType create(String sessType, String assocType) throws AssociationException { return create(sessType, assocType, false); }
public static Association createHmacSha256(String handle, byte[] macKeyBytes, Date expDate) { SecretKey macKey = createMacKey(HMAC_SHA256_ALGORITHM, macKeyBytes); return new Association(TYPE_HMAC_SHA256, handle, macKey, expDate); }
public static boolean isDhSupported(AssociationSessionType type) { String hAlg = type.getHAlgorithm(); if (hAlg == null) // no encryption sessions { return true; } else { return isDhShaSupported(hAlg); } }
public static Association createHmacSha1(String handle, byte[] macKeyBytes, Date expDate) { SecretKey macKey = createMacKey(HMAC_SHA1_ALGORITHM, macKeyBytes); return new Association(TYPE_HMAC_SHA1, handle, macKey, expDate); }
public static boolean isDhSupported(AssociationSessionType type) { String hAlg = type.getHAlgorithm(); if (hAlg == null) // no encryption sessions return true; else return isDhShaSupported(hAlg); }
public static Association createHmacSha256(String handle, byte[] macKeyBytes, int expiryIn) { SecretKey macKey = createMacKey(HMAC_SHA256_ALGORITHM, macKeyBytes); return new Association(TYPE_HMAC_SHA256, handle, macKey, expiryIn); }
public static boolean isDhSupported(AssociationSessionType type) { String hAlg = type.getHAlgorithm(); if (hAlg == null) // no encryption sessions return true; else return isDhShaSupported(hAlg); }
public static Association createHmacSha1(String handle, byte[] macKeyBytes, Date expDate) { SecretKey macKey = createMacKey(HMAC_SHA1_ALGORITHM, macKeyBytes); return new Association(TYPE_HMAC_SHA1, handle, macKey, expDate); }
public static Association createHmacSha256(String handle, byte[] macKeyBytes, int expiryIn) { SecretKey macKey = createMacKey(HMAC_SHA256_ALGORITHM, macKeyBytes); return new Association(TYPE_HMAC_SHA256, handle, macKey, expiryIn); }