FFmpeg
[フレーム]
Files | Functions | Variables
SHA
Hash Functions

SHA-1 and SHA-256 (Secure Hash Algorithm) hash function implementations. More...

Files

file   sha.h
  Public header for SHA-1 & SHA-256 hash function implementations.
 

Functions

struct AVSHAav_sha_alloc (void)
  Allocate an AVSHA context. More...
 
int  av_sha_init (struct AVSHA *context, int bits)
  Initialize SHA-1 or SHA-2 hashing. More...
 
void  av_sha_update (struct AVSHA *ctx, const uint8_t *data, unsigned int len)
  Update hash value. More...
 
void  av_sha_final (struct AVSHA *context, uint8_t *digest)
  Finish hashing and output digest value. More...
 

Variables

const int  av_sha_size
 

Detailed Description

SHA-1 and SHA-256 (Secure Hash Algorithm) hash function implementations.

This module supports the following SHA hash functions:

See Also
For SHA-384, SHA-512, and variants thereof, see SHA-512.

Function Documentation

struct AVSHA* av_sha_alloc ( void  )

Allocate an AVSHA context.

Definition at line 45 of file sha.c.

Referenced by av_hash_alloc(), av_hmac_alloc(), main(), mkv_write_attachments(), and mov_read_adrm().

int av_sha_init ( struct AVSHAcontext,
int  bits 
)

Initialize SHA-1 or SHA-2 hashing.

Parameters
context pointer to the function context (of size av_sha_size)
bits number of bits in digest (SHA-1 - 160 bits, SHA-2 224 or 256 bits)
Returns
zero if initialization succeeded, -1 otherwise

Definition at line 273 of file sha.c.

Referenced by av_hash_init(), get_generic_seed(), main(), mkv_write_attachments(), and mov_read_adrm().

void av_sha_update ( struct AVSHActx,
const uint8_tdata,
unsigned int  len 
)

Update hash value.

Parameters
ctx hash function context
data input data to update hash with
len input data length

Definition at line 315 of file sha.c.

Referenced by av_hash_update(), av_hmac_alloc(), av_sha_final(), get_generic_seed(), main(), mkv_write_attachments(), and mov_read_adrm().

void av_sha_final ( struct AVSHAcontext,
uint8_tdigest 
)

Finish hashing and output digest value.

Parameters
context hash function context
digest buffer where output digest value is stored

Definition at line 345 of file sha.c.

Referenced by av_hash_final(), av_hmac_alloc(), get_generic_seed(), main(), mkv_write_attachments(), and mov_read_adrm().

Variable Documentation

const int av_sha_size

Definition at line 43 of file sha.c.

Referenced by get_generic_seed().


Generated on Sun May 13 2018 02:04:27 for FFmpeg by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /