tiny-AES-c icon indicating copy to clipboard operation
tiny-AES-c copied to clipboard

How to pass the data type as string for key and plain_test varibles in test_encrypt_ecb_verbose method

Open Yogeshkc7 opened this issue 3 years ago • 3 comments

HI

In the method test_encrypt_ecb_verbose, how can we use the key and plain text variable as string input. eg: key[16]={"1234567890123456"}; plain_text[16]={''0987654321123456"}; //Can we use plain text as 16 instead of 64 as array size?

Thanks

Yogeshkc7 avatar Jan 04 '22 10:01 Yogeshkc7

Same here. any answer?

alyfreym avatar Jan 04 '22 10:01 alyfreym

same here. any success?

hamza7171 avatar Feb 17 '22 11:02 hamza7171

Hi, I'd recommend writing a function to do that. C++ would let you overload the = operator, but not C. store the value in a string , and parse it 2 characters at a time into a uint8_t , then store in the uint8_t. repeat over the required length. I am sure the PR would be well received!

davidbrucecousins avatar Jul 25 '22 14:07 davidbrucecousins