]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - keysize_descriptor.h
new and more compact aes
[avr-crypto-lib.git] / keysize_descriptor.h
index 39a563e3868f34cbfe9c2dec55bb35e6096d2961..84d8ed8524776a95c787b0d60bc926b139f208c0 100644 (file)
@@ -1,7 +1,7 @@
 /* keysize_descriptor.h */
 /*
-    This file is part of the Crypto-avr-lib/microcrypt-lib.
-    Copyright (C) 2009  Daniel Otte (daniel.otte@rub.de)
+    This file is part of the AVR-Crypto-Lib.
+    Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 /**
  * \file    keysize_descriptor.h 
  * \author  Daniel Otte
- * \email   daniel.otte@rub.de
+ * \email   bg@nerilex.org
  * \date    2009-01-07
  * \license GPLv3 or later
  */
@@ -35,6 +35,7 @@
 #define KS_TYPE_RANGE      0x02
 #define KS_TYPE_ARG_RANGE  0x03
 
+#define KS_INT(a) ((a) & 0xFF), ((a) >> 8)
 
 typedef struct{ /* keysize is valid if listed in items */
        uint8_t  n_items;  /* number of items (value 0 is reserved) */
@@ -54,5 +55,8 @@ typedef struct{ /* keysize is valid if min<=keysize<=max and if keysize mod dist
 }keysize_desc_arg_range_t;
 
 uint8_t is_valid_keysize_P(PGM_VOID_P ks_desc, uint16_t keysize);
+uint16_t get_keysize(PGM_VOID_P ks_desc);
+uint16_t get_keysizes(PGM_VOID_P ks_desc, uint16_t** list);
+
 
 #endif /* KEYSIZE_DESCRIPTOR_H_ */