protected byte [ ] newSigningKey ( AWSCredentials credentials , String dateStamp , String regionName , String serviceName ) { byte [ ] kSecret = ( "AWS4" + credentials . getAWSSecretKey ( ) ) . getBytes ( Charset . forName ( "UTF-8" ) ) ; byte [ ] kDate = sign ( dateStamp , kSecret , SigningAlgorithm . HmacSHA256 ) ; byte [ ] kRegion = sign ( regionName , kDate , SigningAlgorithm . HmacSHA256 ) ; byte [ ] kService = sign ( serviceName , kRegion , SigningAlgorithm . HmacSHA256 ) ; return sign ( AWS4_TERMINATOR , kService , SigningAlgorithm . HmacSHA256 ) ; }
Generates a new signing key from the given parameters and returns it .