@Test public void generatedFulfillableFulfillment() { InterledgerFulfillment fulfillment = StreamUtils.generatedFulfillableFulfillment(SHARED_SECRET, DATA); assertThat(fulfillment.getPreimage()).isEqualTo(FULFILLMENT); assertThat(fulfillment).isEqualTo(InterledgerFulfillment.of(FULFILLMENT)); }
public static InterledgerFulfillment generatedFulfillableFulfillment( final SharedSecret sharedSecret, final byte[] data ) { Objects.requireNonNull(sharedSecret); Objects.requireNonNull(data); final SecretKey secretKey = new SecretKeySpec(sharedSecret.key(), HMAC_SHA256_ALG_NAME); final byte[] hmacKey = Hashing.hmacSha256(secretKey).hashBytes(ILP_STREAM_FULFILLMENT).asBytes(); final SecretKey hmacSecretKey = new SecretKeySpec(hmacKey, HMAC_SHA256_ALG_NAME); final byte[] fulfillmentBytes = Hashing.hmacSha256(hmacSecretKey).hashBytes(data).asBytes(); return InterledgerFulfillment.of(fulfillmentBytes); }
StreamUtils { public static InterledgerFulfillment generatedFulfillableFulfillment( final SharedSecret sharedSecret, final byte[] data ) { Objects.requireNonNull(sharedSecret); Objects.requireNonNull(data); final SecretKey secretKey = new SecretKeySpec(sharedSecret.key(), HMAC_SHA256_ALG_NAME); final byte[] hmacKey = Hashing.hmacSha256(secretKey).hashBytes(ILP_STREAM_FULFILLMENT).asBytes(); final SecretKey hmacSecretKey = new SecretKeySpec(hmacKey, HMAC_SHA256_ALG_NAME); final byte[] fulfillmentBytes = Hashing.hmacSha256(hmacSecretKey).hashBytes(data).asBytes(); return InterledgerFulfillment.of(fulfillmentBytes); } }
StreamUtils { public static InterledgerFulfillment generatedFulfillableFulfillment( final SharedSecret sharedSecret, final byte[] data ) { Objects.requireNonNull(sharedSecret); Objects.requireNonNull(data); final SecretKey secretKey = new SecretKeySpec(sharedSecret.key(), HMAC_SHA256_ALG_NAME); final byte[] hmacKey = Hashing.hmacSha256(secretKey).hashBytes(ILP_STREAM_FULFILLMENT).asBytes(); final SecretKey hmacSecretKey = new SecretKeySpec(hmacKey, HMAC_SHA256_ALG_NAME); final byte[] fulfillmentBytes = Hashing.hmacSha256(hmacSecretKey).hashBytes(data).asBytes(); return InterledgerFulfillment.of(fulfillmentBytes); }  }
StreamUtils { public static InterledgerFulfillment generatedFulfillableFulfillment( final SharedSecret sharedSecret, final byte[] data ) { Objects.requireNonNull(sharedSecret); Objects.requireNonNull(data); final SecretKey secretKey = new SecretKeySpec(sharedSecret.key(), HMAC_SHA256_ALG_NAME); final byte[] hmacKey = Hashing.hmacSha256(secretKey).hashBytes(ILP_STREAM_FULFILLMENT).asBytes(); final SecretKey hmacSecretKey = new SecretKeySpec(hmacKey, HMAC_SHA256_ALG_NAME); final byte[] fulfillmentBytes = Hashing.hmacSha256(hmacSecretKey).hashBytes(data).asBytes(); return InterledgerFulfillment.of(fulfillmentBytes); }  static InterledgerCondition unfulfillableCondition(); static InterledgerFulfillment generatedFulfillableFulfillment(
      final SharedSecret sharedSecret, final byte[] data
  ); static UnsignedLong min(final UnsignedLong value1, final UnsignedLong value2); static UnsignedLong max(final UnsignedLong value1, final UnsignedLong value2); }
StreamUtils { public static InterledgerFulfillment generatedFulfillableFulfillment( final SharedSecret sharedSecret, final byte[] data ) { Objects.requireNonNull(sharedSecret); Objects.requireNonNull(data); final SecretKey secretKey = new SecretKeySpec(sharedSecret.key(), HMAC_SHA256_ALG_NAME); final byte[] hmacKey = Hashing.hmacSha256(secretKey).hashBytes(ILP_STREAM_FULFILLMENT).asBytes(); final SecretKey hmacSecretKey = new SecretKeySpec(hmacKey, HMAC_SHA256_ALG_NAME); final byte[] fulfillmentBytes = Hashing.hmacSha256(hmacSecretKey).hashBytes(data).asBytes(); return InterledgerFulfillment.of(fulfillmentBytes); }  static InterledgerCondition unfulfillableCondition(); static InterledgerFulfillment generatedFulfillableFulfillment(
      final SharedSecret sharedSecret, final byte[] data
  ); static UnsignedLong min(final UnsignedLong value1, final UnsignedLong value2); static UnsignedLong max(final UnsignedLong value1, final UnsignedLong value2);  }