question: protected static byte [ ] hkdfExpand ( byte [ ] ikm , byte [ ] salt , byte [ ] info , int length ) throws InvalidKeyException , NoSuchAlgorithmException { HKDFBytesGenerator hkdf = new HKDFBytesGenerator ( new SHA256Digest ( ) ) ; hkdf . init ( new HKDFParameters ( ikm , salt , info ) ) ; byte [ ] okm = new byte [ length ] ; hkdf . generateBytes ( okm , 0 , length ) ; return okm ; }
target:  Convenience method for computing the HMAC Key Derivation Function. The real work is offloaded to BouncyCastle.