]> git.tdb.fi Git - libs/crypto.git/blobdiff - source/sha2.h
Account for SHA-512 asking for a 128-bit message length
[libs/crypto.git] / source / sha2.h
index ed5c4fe36d0a210dd8c24e740565eaa888c17941..060b8d79af5cc2d72010821957dd28d88645faf9 100644 (file)
@@ -43,6 +43,7 @@ struct SHA2_256Constants
                WORD_SIZE = sizeof(WordType),
                BLOCK_SIZE = 64,   // 512 bits
                DIGEST_SIZE = 32,  // 256 bits
+               MIN_PADDING = 8,
                N_ROUNDS = 64
        };
 
@@ -60,6 +61,7 @@ struct SHA2_512Constants
                WORD_SIZE = sizeof(WordType),
                BLOCK_SIZE = 128,  // 1024 bits
                DIGEST_SIZE = 64,  // 512 bits
+               MIN_PADDING = 16,
                N_ROUNDS = 80
        };