@Test public void testComputePrf_compareToHkdfUtilSha384() throws Exception { HashType hash = HashType.SHA384; byte[] ikm = Random.randBytes(123); byte[] salt = Random.randBytes(234); byte[] info = Random.randBytes(345); byte[] result = new byte[456]; HkdfStreamingPrf prf = new HkdfStreamingPrf(hash, ikm, salt); InputStream input = prf.computePrf(info); input.read(result); assertThat(Hkdf.computeHkdf("HmacSha384", ikm, salt, info, result.length)).isEqualTo(result); }
@Override public InputStream computePrf(final byte[] input) { return new HkdfInputStream(input); }
HkdfStreamingPrf implements StreamingPrf { @Override public InputStream computePrf(final byte[] input) { return new HkdfInputStream(input); } }
HkdfStreamingPrf implements StreamingPrf { @Override public InputStream computePrf(final byte[] input) { return new HkdfInputStream(input); } HkdfStreamingPrf(final HashType hashType, final byte[] ikm, final byte[] salt); }
HkdfStreamingPrf implements StreamingPrf { @Override public InputStream computePrf(final byte[] input) { return new HkdfInputStream(input); } HkdfStreamingPrf(final HashType hashType, final byte[] ikm, final byte[] salt); @Override InputStream computePrf(final byte[] input); }
HkdfStreamingPrf implements StreamingPrf { @Override public InputStream computePrf(final byte[] input) { return new HkdfInputStream(input); } HkdfStreamingPrf(final HashType hashType, final byte[] ikm, final byte[] salt); @Override InputStream computePrf(final byte[] input);  }