public static StreamingPrf create(HkdfPrfKey key) throws GeneralSecurityException {
    Bytes saltFromKey = key.getParameters().getSalt();
    return new HkdfStreamingPrf(
        HASH_TYPE_CONVERTER.toProtoEnum(key.getParameters().getHashType()),
        key.getKeyBytes().toByteArray(InsecureSecretKeyAccess.get()),
        saltFromKey == null ? new byte[] {} : saltFromKey.toByteArray());
  }
An implementation of the HKDF pseudorandom function, as given by RFC 5869.
java_src/src/main/java/com/google/crypto/tink/subtle/prf/HkdfStreamingPrf.java