libc/test/test-arc4random.c
static void testQuarterround(void) {
    uint32_t a = 0x11111111, b = 0x01020304, c = 0x9b8d6f43, d = 0x01234567;
    QUARTERROUND(a, b, c, d);
    assert(a == 0xea2a92f4);
    assert(b == 0xcb1cf8ce);
    assert(c == 0x4581472e);
    assert(d == 0x5881c4bb);
}
// These tests for the ChaCha20 implementation are based on the test vectors in
// RFC 8439.
These tests for the ChaCha20 implementation are based on the test vectors in
RFC 8439.
These tests for the ChaCha20 implementation are based on the test vectors in RFC 8439 .
static void testQuarterround(void) {
    uint32_t a = 0x11111111, b = 0x01020304, c = 0x9b8d6f43, d = 0x01234567;
    QUARTERROUND(a, b, c, d);
    assert(a == 0xea2a92f4);
    assert(b == 0xcb1cf8ce);
    assert(c == 0x4581472e);
    assert(d == 0x5881c4bb);
}
static void testQuarterround ( void ) { uint32_t a = 0x11111111 , b = 0x01020304 , c = 0x9b8d6f43 , d = 0x01234567 ; QUARTERROUND ( a , b , c , d ) ; assert ( a == 0xea2a92f4 ) ; assert ( b == 0xcb1cf8ce ) ; assert ( c == 0x4581472e ) ; assert ( d == 0x5881c4bb ) ; }
These tests for the ChaCha20 implementation are based on the test vectors in
RFC 8439.
These tests for the ChaCha20 implementation are based on the test vectors in RFC 8439 .