51 printf(
"usage: ffhash [b64:]algorithm [input]...\n");
52 printf(
"Supported hash algorithms:");
79 int fd,
flags = O_RDONLY;
85 if (file) fd = open(file,
flags);
100 printf(
"+READ-FAILED: %s", strerror(err));
122 const char *hash_name;
134 printf(
"Invalid hash type: %s\n", hash_name);
137 printf(
"%s\n", strerror(errno));
143 for (
i = 2;
i < argc;
i++)
static uint8_t hash[HASH_SIZE]
static av_cold void close(AVCodecParserContext *s)
static uint32_t BS_FUNC read(BSCTX *bc, unsigned int n)
Return n bits from the buffer, n has to be in the 0-32 range.
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
__device__ int printf(const char *,...)
void av_hash_freep(AVHashContext **ctx)
Free hash context and set hash context pointer to NULL.
void av_hash_final_b64(struct AVHashContext *ctx, uint8_t *dst, int size)
Finalize a hash context and store the Base64 representation of the actual hash value as a string.
void av_hash_final_hex(struct AVHashContext *ctx, uint8_t *dst, int size)
Finalize a hash context and store the hexadecimal representation of the actual hash value as a string...
void av_hash_init(AVHashContext *ctx)
Initialize or reset a hash context.
void av_hash_update(AVHashContext *ctx, const uint8_t *src, size_t len)
Update a hash context with additional data.
int av_hash_alloc(AVHashContext **ctx, const char *name)
Allocate a hash context for the algorithm specified by name.
const char * av_hash_names(int i)
Get the names of available hash algorithms.
#define AV_HASH_MAX_SIZE
Maximum value that av_hash_get_size() will currently return.
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
const char * av_hash_get_name(const AVHashContext *ctx)
#define check(x, y, S, v)