@Test public void testComputePrf_rfc589vector3() throws Exception { HashType hash = HashType.SHA256; byte[] ikm = Hex.decode("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"); byte[] salt = Hex.decode(""); byte[] info = Hex.decode(""); byte[] expectedResult = Hex.decode( "8da4e775a563c18f715f802a063c5a31" + "b8a11f5c5ee1879ec3454e5f3c738d2d" + "9d201395faa4b61a96c8"); HkdfStreamingPrf prf = new HkdfStreamingPrf(hash, ikm, salt); InputStream input = prf.computePrf(info); byte[] output = new byte[expectedResult.length]; assertThat(input.read(output)).isEqualTo(expectedResult.length); assertThat(output).isEqualTo(expectedResult); }
@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);  }