protected String generateSignature ( Credential signingCredential , String algorithmURI , String queryString ) throws MessageEncodingException { log . debug ( String . format ( "Generating signature with key type '%s', algorithm URI '%s' over query string '%s'" , CredentialSupport . extractSigningKey ( signingCredential ) . getAlgorithm ( ) , algorithmURI , queryString ) ) ; String b64Signature ; try { byte [ ] rawSignature = XMLSigningUtil . signWithURI ( signingCredential , algorithmURI , queryString . getBytes ( StandardCharsets . UTF_8 ) ) ; b64Signature = Base64Support . encode ( rawSignature , Base64Support . UNCHUNKED ) ; log . debug ( "Generated digital signature value (base64-encoded) {}" , b64Signature ) ; } catch ( final org . opensaml . security . SecurityException e ) { throw new MessageEncodingException ( "Unable to sign URL query string" , e ) ; } return b64Signature ; }
Generates the signature over the query string .