@Test public void testComputePrf_rfc589vector7() throws Exception { HashType hash = HashType.SHA1; byte[] ikm = Hex.decode("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"); byte[] salt = Hex.decode(""); byte[] info = Hex.decode(""); byte[] expectedResult = Hex.decode( "0ac1af7002b3d761d1e55298da9d0506" + "b9ae52057220a306e07b6b87e8df21d0" + "ea00033de03984d34918"); 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);  }