question: public byte [ ] calculateHMAC_SHA256 ( byte [ ] input , byte [ ] key , int length ) { byte [ ] output = null ; try { hmacSHA256 . init ( new SecretKeySpec ( key , 0 , length , "HmacSHA256" ) ) ; output = hmacSHA256 . doFinal ( input ) ; } catch ( InvalidKeyException e ) { log . error ( "Invalid key" , e ) ; } return output ; }
target:  Calculates an HMAC SHA256 hash using a set key length.