test_class.file: core/src/test/java/dk/alexandra/fresco/framework/util/AesCtrDrbgFactoryTest.java
test_class.identifier: AesCtrDrbgFactoryTest
test_case.body: @Test
    public void testFromDerivedSeed() throws NoSuchAlgorithmException {
      // Note this test is implementation specific and may fail if we change how the seed is hashed
      MessageDigest md = MessageDigest.getInstance(AesCtrDrbgFactory.HASH_ALGORITHM);
      Drbg drbgA = AesCtrDrbgFactory.fromDerivedSeed((byte) 0x01, (byte) 0x02);
      byte[] seed = md.digest(new byte[] { 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x02 });
      assertEquals(AesCtrDrbg.SEED_LENGTH, seed.length);
      Drbg drbgB = new AesCtrDrbg(seed);
      byte[] bytesA = new byte[10000];
      byte[] bytesB = new byte[10000];
      drbgA.nextBytes(bytesA);
      drbgB.nextBytes(bytesB);
      assertArrayEquals(bytesA, bytesB);
    }
test_case.class_method_signature: AesCtrDrbgFactoryTest.testFromDerivedSeed()
test_case.full_signature: @Test public void testFromDerivedSeed()
test_case.identifier: testFromDerivedSeed
test_case.invocations: getInstance fromDerivedSeed digest assertEquals nextBytes nextBytes assertArrayEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFromDerivedSeed()
focal_class.declarator: HASH_ALGORITHM = "SHA-256"
focal_class.modifier: public static final
focal_class.original_string: public static final String HASH_ALGORITHM = "SHA-256";
focal_class.type: String
focal_class.var_name: HASH_ALGORITHM
focal_class.file: core/src/main/java/dk/alexandra/fresco/framework/util/AesCtrDrbgFactory.java
focal_class.identifier: AesCtrDrbgFactory
focal_class.class_method_signature: AesCtrDrbgFactory.AesCtrDrbgFactory()
focal_class.full_signature: private  AesCtrDrbgFactory()
focal_class.identifier: AesCtrDrbgFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  AesCtrDrbgFactory()
focal_class.class_method_signature: AesCtrDrbgFactory.fromDerivedSeed(final byte... bytes)
focal_class.full_signature: public static Drbg fromDerivedSeed(final byte... bytes)
focal_class.identifier: fromDerivedSeed
focal_class.modifiers: public static
focal_class.parameters: (final byte... bytes)
focal_class.return: Drbg
focal_class.signature: Drbg fromDerivedSeed(final byte... bytes)
focal_class.class_method_signature: AesCtrDrbgFactory.fromRandomSeed(final byte[] seed)
focal_class.full_signature: public static Drbg fromRandomSeed(final byte[] seed)
focal_class.identifier: fromRandomSeed
focal_class.modifiers: public static
focal_class.parameters: (final byte[] seed)
focal_class.return: Drbg
focal_class.signature: Drbg fromRandomSeed(final byte[] seed)
focal_class.class_method_signature: AesCtrDrbgFactory.fromSampledSeed()
focal_class.full_signature: public static Drbg fromSampledSeed()
focal_class.identifier: fromSampledSeed
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Drbg
focal_class.signature: Drbg fromSampledSeed()
focal_class.class_method_signature: AesCtrDrbgFactory.hash(final byte[] bytes)
focal_class.full_signature: private static byte[] hash(final byte[] bytes)
focal_class.identifier: hash
focal_class.modifiers: private static
focal_class.parameters: (final byte[] bytes)
focal_class.return: byte[]
focal_class.signature: byte[] hash(final byte[] bytes)
focal_method.body: public static Drbg fromDerivedSeed(final byte... bytes) {
      return ExceptionConverter.safe(() -> fromRandomSeed(hash(bytes)),
            "Unable to derive seed for AesCtrDrbg");
    }
focal_method.class_method_signature: AesCtrDrbgFactory.fromDerivedSeed(final byte... bytes)
focal_method.full_signature: public static Drbg fromDerivedSeed(final byte... bytes)
focal_method.identifier: fromDerivedSeed
focal_method.invocations: safe fromRandomSeed hash
focal_method.modifiers: public static
focal_method.parameters: (final byte... bytes)
focal_method.return: Drbg
focal_method.signature: Drbg fromDerivedSeed(final byte... bytes)