FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
des-test.c File Reference
#include "des.c"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "time.h"

Go to the source code of this file.

Functions

static uint64_t rand64 (void)
 
static int run_test (int cbc, int decrypt)
 
int main (void)
 

Variables

static const uint8_t test_key [] = { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 }
 
static const uint8_t plain [] = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }
 
static const uint8_t crypt [] = { 0x4a, 0xb6, 0x5b, 0x3d, 0x4b, 0x06, 0x15, 0x18 }
 
static uint8_t tmp [8]
 
static uint8_t large_buffer [10002][8]
 
static const uint8_t cbc_key []
 

Function Documentation

static uint64_t rand64 ( void  )
static

Definition at line 28 of file des-test.c.

Referenced by main().

static int run_test ( int  cbc,
int  decrypt 
)
static

Definition at line 46 of file des-test.c.

Referenced by main().

int main ( void  )

Definition at line 70 of file des-test.c.

Variable Documentation

const uint8_t test_key[] = { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 }
static

Definition at line 35 of file des-test.c.

Referenced by main().

const uint8_t plain[] = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }
static

Definition at line 36 of file des-test.c.

Referenced by main().

const uint8_t crypt[] = { 0x4a, 0xb6, 0x5b, 0x3d, 0x4b, 0x06, 0x15, 0x18 }
static

Definition at line 37 of file des-test.c.

Referenced by main(), test_xtea(), and xtea_crypt().

uint8_t tmp[8]
static

Definition at line 38 of file des-test.c.

Referenced by aac_sync(), ac3_sync(), add_timecode_metadata(), add_yblock(), alac_stereo_decorrelation(), apply_dependent_coupling_fixed(), apply_filter(), apply_independent_coupling_fixed(), apply_tilt_comp(), apply_tns(), ass_split_section(), atomic_ptr_cas_gcc(), av_aes_init(), av_bswap32(), av_buffer_realloc(), av_cmp_q(), av_des_crypt_mac(), av_dict_set(), av_frame_make_writable(), av_frame_new_side_data(), av_lfg_init(), av_opt_is_set_to_default(), av_opt_set(), av_opt_set_dict2(), av_program_add_stream_index(), av_stream_new_side_data(), av_utf8_decode(), avcodec_decode_audio4(), avcodec_decode_subtitle2(), avcodec_decode_video2(), avcodec_open2(), avcodec_send_packet(), avfilter_graph_parse_ptr(), avformat_open_input(), avg_h264_qpel4_h_lowpass_mmi(), avg_h264_qpel4_hv_lowpass_mmi(), avg_h264_qpel4_v_lowpass_mmi(), avg_h264_qpel8_h_lowpass_l2_mmi(), avg_h264_qpel8_h_lowpass_mmi(), avg_h264_qpel8_v_lowpass_mmi(), avg_h264_qpel8or16_hv2_lowpass_mmi(), avpriv_dca_convert_bitstream(), avpriv_find_start_code(), biquad(), bytestream2_get_levarint(), cache_seek(), calc_diffs(), celt_decode_band(), channel_decorrelation(), check_bits_for_superframe(), chs_filter_band_data(), combine_fft(), compress_alpha(), copy_block16_mmi(), copy_chapters(), count_frame_header(), create_filtergraph(), deblock_v8_luma_intra_8_mmi(), decklink_write_video_packet(), decode_13(), decode_frame(), decode_frame_header(), decode_header(), decode_info_header(), decode_main_header(), decode_residuals(), decode_str(), decode_stream_header(), decode_subframe(), decode_syncpoint(), decompress_indices(), decorr_stereo(), decorr_stereo_pass2(), decorr_stereo_pass_id2(), decorr_stereo_quick(), decorrelate(), deInterlaceBlendLinear_TMPL(), deInterlaceFF_TMPL(), deInterlaceL5_TMPL(), denoise_spatial(), denoise_temporal(), dering_TMPL(), dirac_decode_data_unit(), dirac_unpack_idwt_params(), distance(), do_8tap_2d_c(), do_bilin_2d_c(), do_scaled_8tap_c(), doVertDefFilter_TMPL(), dss_sp_convert_coeffs(), dss_sp_gen_exc(), dss_sp_sf_synthesis(), dss_sp_shift_sq_add(), dss_sp_shift_sq_sub(), dss_sp_unpack_coeffs(), dss_sp_update_state(), dump_metadata(), duration_max(), encode_frame(), encode_init(), encode_residual_ch(), epic_free_pixel_cache(), evrc_decode_frame(), exchange_uv(), extract_color(), extract_header(), extract_m8(), f_func(), ff_ac3_bit_alloc_calc_mask(), ff_acelp_apply_order_2_transfer_function(), ff_acelp_high_pass_filter(), ff_add_cpb_side_data(), ff_add_pixels_clamped_mmi(), ff_alsa_get_device_list(), ff_ass_split_override_codes(), ff_avg_h264_chroma_mc4_mmi(), ff_avg_h264_chroma_mc8_mmi(), ff_celt_decode_frame(), ff_check_pixfmt_descriptors(), ff_dct_unquantize_mpeg1_inter_mmi(), ff_dct_unquantize_mpeg1_intra_mmi(), ff_dct_unquantize_mpeg2_intra_mmi(), ff_decklink_read_header(), ff_diff_pixels_mmi(), ff_frame_thread_encoder_init(), ff_get_pixels_8_mmi(), ff_get_qtpalette(), ff_h2645_packet_split(), ff_h264_decode_mb_cavlc(), ff_h264_decode_slice_header(), ff_h264_idct8_add_8_mmi(), ff_h264_idct_add_8_mmi(), ff_h264_luma_dc_dequant_idct_8_mmi(), ff_hevc_decode_short_term_rps(), ff_htmlmarkup_to_ass(), ff_ivi_inverse_haar_4x4(), ff_ivi_inverse_haar_8x8(), ff_ivi_inverse_slant_4x4(), ff_ivi_inverse_slant_8x8(), ff_kbd_window_init(), ff_loop_filter_v_48_16_msa(), ff_loop_filter_v_84_16_msa(), ff_loop_filter_v_88_16_msa(), ff_mkv_stereo3d_conv(), ff_nelly_get_sample_bits(), ff_oss_audio_open(), ff_pca(), ff_pred16x16_dc_8_mmi(), ff_pred16x16_horizontal_8_mmi(), ff_pred16x16_vertical_8_mmi(), ff_pred4x4_dc_8_mmi(), ff_pred8x16_horizontal_8_mmi(), ff_pred8x16_vertical_8_mmi(), ff_pred8x8_horizontal_8_mmi(), ff_pred8x8_top_dc_8_mmi(), ff_pred8x8_vertical_8_mmi(), ff_pred8x8l_dc_8_mmi(), ff_pred8x8l_top_dc_8_mmi(), ff_pred8x8l_vertical_8_mmi(), ff_put_h264_chroma_mc4_mmi(), ff_put_h264_chroma_mc8_mmi(), ff_read_packet(), ff_ref_fdct(), ff_ref_idct(), ff_snow_frame_start(), ff_text_r8(), ff_thread_release_buffer(), ff_videotoolbox_h264_decode_slice(), ff_vorbis_ready_floor1_list(), ff_vp6_filter_diag4_c(), ff_wma_get_frame_len_bits(), ff_xvid_rate_control_init(), ff_yuv2rgb_init_tables_ppc(), ffio_free_dyn_buf(), ffio_read_varlen(), ffm_write_header_codec_ctx(), ffm_write_header_codec_private_ctx(), ffm_write_recommended_config(), ffmmal_init_decoder(), ffserver_opt_preset(), ffserver_set_float_param(), ffserver_set_int_param(), fft15(), fill_coding_method_array(), fill_tone_level_array(), fill_whitepoint_conv_table(), filter(), filter_frame(), filter_ts(), find_and_decode_index(), find_block_motion(), fixed_exp(), fixed_log(), flac_parse_block_header(), flt16_even(), flt16_round(), flush_fifo(), frame_erasure(), generate_kernel(), generate_noise(), get_asf_string(), get_bits(), get_bits_le(), get_block_rd(), get_cod(), get_cookies(), get_exponent_dynamic(), get_generic_seed(), get_packet_header(), get_poc(), get_qcd(), get_sbits(), get_stats(), get_tcp_server_response(), grow_array(), gxf_resync_media(), hevc_loopfilter_luma_hor_msa(), hevc_loopfilter_luma_ver_msa(), hl_decode_mb_444(), hls_append_segment(), horizontal_compose_dd137i_TMPL(), horizontal_compose_dd97i_TMPL(), horizontal_compose_fidelityi_TMPL(), htmlencode(), idct(), idct6(), iff_read_header(), imc_decode_level_coefficients(), imc_decode_level_coefficients_raw(), imdct15_half(), imdct36(), init_axis_from_font(), init_muxer(), init_opencl_mtx(), isf_add_mean_and_past(), lfe_iir_c(), list_devices_for_context(), load_textfile(), long_term_filter(), lsf_restore_from_previous(), main(), matroska_parse_wavpack(), mmsh_open_internal(), mov_read_header(), mov_read_sidx(), mpc_read_packet(), multiswap_dec(), multiswap_enc(), mxf_add_metadata_set(), nut_read_packet(), open_url(), parse_device_name(), pcm_encode_frame(), piz_uncompress(), pred16x16_plane_compat_mmi(), predict(), predictor_init_state(), process_line0(), put_codebook_header(), put_ebml_sint(), put_ebml_uint(), put_h264_qpel4_h_lowpass_mmi(), put_h264_qpel4_hv_lowpass_mmi(), put_h264_qpel4_v_lowpass_mmi(), put_h264_qpel8_h_lowpass_l2_mmi(), put_h264_qpel8_h_lowpass_mmi(), put_h264_qpel8_v_lowpass_mmi(), put_h264_qpel8or16_hv1_lowpass_mmi(), put_hevc_epel_bi_hv(), put_hevc_epel_bi_w_hv(), put_hevc_epel_hv(), put_hevc_epel_uni_hv(), put_hevc_epel_uni_w_hv(), put_hevc_qpel_bi_hv(), put_hevc_qpel_bi_w_hv(), put_hevc_qpel_hv(), put_hevc_qpel_uni_hv(), put_hevc_qpel_uni_w_hv(), put_pixels8x8_overlapped(), put_residue_header(), put_str16(), qdm2_decode_init(), qdm2_get_vlc(), quantize_bands(), queue_pop(), r3d_read_red1(), r3d_read_reda(), r3d_read_redv(), r3d_read_reos(), radix_sort(), read_from_fifo(), read_header(), read_packet(), read_payload_length_info(), read_restart_header(), read_tfra(), realloc_section_array(), recode_subtitle(), reget_buffer_internal(), reorder_block(), resample(), rotate_luts(), rtmp_open(), rtp_parse_addr_list(), run_test(), save_bits(), sbr_hf_apply_noise(), sbr_make_f_master(), scaled_filter_8tap_fn(), set_highshelf_rbj(), set_metadata_float(), setbits(), show_bits(), shrink88(), socket_open_listen(), stabilize_lsps(), swr_convert(), swri_get_dither(), targa_decode_rle(), tgv_decode_inter(), truespeech_apply_twopoint_filter(), truespeech_correlate_filter(), truespeech_place_pulses(), udp_open(), ulti_decode_frame(), uninit(), unpack_SQVH(), vaapi_encode_h264_write_sequence_header(), vaapi_encode_h264_write_slice_header(), vaapi_encode_h265_write_sequence_header(), vaapi_encode_h265_write_slice_header(), vc1_decode_frame(), vda_old_h264_decode_slice(), videotoolbox_buffer_copy(), vivo_read_header(), vp6_build_huff_tree(), vp6_filter_diag2(), w_c(), write_sm_data(), write_utf8(), xmlescape(), and xvid_encode_frame().

uint8_t large_buffer[10002][8]
static

Definition at line 39 of file des-test.c.

Referenced by run_test().

const uint8_t cbc_key[]
static
Initial value:
= {
0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01,
0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, 0x23
}

Definition at line 40 of file des-test.c.

Referenced by run_test().