throw new IllegalStateException("Enveloping XMLSignature can not have custom envelope names");
}
String userNameKey = SecurityConstants.SIGNATURE_USERNAME;
CryptoLoader loader = new CryptoLoader();
Crypto crypto = loader.getCrypto(message,
SecurityConstants.SIGNATURE_CRYPTO,
SecurityConstants.SIGNATURE_PROPERTIES);
if (crypto == null) {
crypto = loader.getCrypto(message,
SecurityConstants.ENCRYPT_CRYPTO,
SecurityConstants.ENCRYPT_PROPERTIES);
userNameKey = SecurityConstants.ENCRYPT_USERNAME;
}
String user = SecurityUtils.getUserName(message, crypto, userNameKey);