Go to the documentation of this file.
41 static void DetectTransformToSha1RegisterTests(
void);
49 "convert to sha1 hash of the buffer";
51 "/rules/transforms.html#to-sha1";
53 DetectTransformToSha1Setup;
58 DetectTransformToSha1RegisterTests;
77 "needed for to_sha1 keyword");
86 const uint8_t *input = buffer->
inspect;
91 SCSha1HashBuffer(input, input_len, output,
sizeof(output));
96 static int DetectTransformToSha1Test01(
void)
98 const uint8_t *input = (
const uint8_t *)
" A B C D ";
99 uint32_t input_len = strlen((
char *)input);
105 TransformToSha1(&buffer, NULL);
111 static void DetectTransformToSha1RegisterTests(
void)
114 DetectTransformToSha1Test01);
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
main detection engine ctx
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
void InspectionBufferInit(InspectionBuffer *buffer, uint32_t initial_size)
#define PASS
Pass the test.
void PrintRawDataFp(FILE *fp, const uint8_t *buf, uint32_t buflen)
@ SC_ERR_HASHING_DISABLED
void InspectionBufferCopy(InspectionBuffer *buffer, uint8_t *buf, uint32_t buf_len)
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
void(* Transform)(InspectionBuffer *, void *context)
#define SCLogError(err_code,...)
Macro used to log ERROR messages.
void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
int DetectSignatureAddTransform(Signature *s, int transform, void *options)
void InspectionBufferFree(InspectionBuffer *buffer)
void(* RegisterTests)(void)