- present_init(key, 80, &ctx);
- present_enc(buffer, &ctx);
+ present80_init(key, 80, &ctx);
+ present80_enc(buffer, &ctx);
+ cli_putstr_P(PSTR("\r\ncipher: "));
+ cli_hexdump(buffer, 8);
+ present80_dec(buffer, &ctx);
+ cli_putstr_P(PSTR("\r\nplain : "));
+ cli_hexdump(buffer, 8);
+ cli_putstr_P(PSTR("\r\n"));
+}
+
+void testrun_selfenc_128(uint8_t *key, uint8_t *buffer){
+
+ present128_ctx_t ctx;
+ cli_putstr_P(PSTR("\r\nkey : "));
+ cli_hexdump(key, 16);
+ cli_putstr_P(PSTR("\r\nplain : "));
+ cli_hexdump(buffer, 8);
+ present128_init(key, 128, &ctx);
+ present128_enc(buffer, &ctx);