diff options
author | David Benjamin <davidben@chromium.org> | 2014-10-06 19:12:30 -0400 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-10-06 23:51:50 +0000 |
commit | 622a6db14eb4f5147b32c13353289c288f6c3818 (patch) | |
tree | 3c6d0d4131ef3f2a1a2315714e996f47ebc3da3f /include | |
parent | 83e52bce3c42c6eeb9dc65315264c4e2c372b2e8 (diff) | |
download | boringssl-622a6db14eb4f5147b32c13353289c288f6c3818.zip boringssl-622a6db14eb4f5147b32c13353289c288f6c3818.tar.gz boringssl-622a6db14eb4f5147b32c13353289c288f6c3818.tar.bz2 |
Fix SHA*_Final documentation.
The minimum buffer size requirements on some were off.
Change-Id: I3eabe3dc352e4333efedb40aa071daa2f2ea0db2
Reviewed-on: https://boringssl-review.googlesource.com/1902
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/sha.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/openssl/sha.h b/include/openssl/sha.h index 9e71ec4..1f321fc 100644 --- a/include/openssl/sha.h +++ b/include/openssl/sha.h @@ -120,11 +120,11 @@ OPENSSL_EXPORT int SHA224_Init(SHA256_CTX *sha); OPENSSL_EXPORT int SHA224_Update(SHA256_CTX *sha, const void *data, size_t len); /* SHA224_Final adds the final padding to |sha| and writes the resulting digest - * to |md|, which must have at least |SHA_DIGEST_LENGTH| bytes of space. */ + * to |md|, which must have at least |SHA224_DIGEST_LENGTH| bytes of space. */ OPENSSL_EXPORT int SHA224_Final(uint8_t *md, SHA256_CTX *sha); /* SHA224 writes the digest of |len| bytes from |data| to |out| and returns - * |out|. There must be at least |SHA_DIGEST_LENGTH| bytes of space in + * |out|. There must be at least |SHA224_DIGEST_LENGTH| bytes of space in * |out|. */ OPENSSL_EXPORT uint8_t *SHA224(const uint8_t *data, size_t len, uint8_t *out); @@ -144,11 +144,11 @@ OPENSSL_EXPORT int SHA256_Init(SHA256_CTX *sha); OPENSSL_EXPORT int SHA256_Update(SHA256_CTX *sha, const void *data, size_t len); /* SHA256_Final adds the final padding to |sha| and writes the resulting digest - * to |md|, which must have at least |SHA_DIGEST_LENGTH| bytes of space. */ + * to |md|, which must have at least |SHA256_DIGEST_LENGTH| bytes of space. */ OPENSSL_EXPORT int SHA256_Final(uint8_t *md, SHA256_CTX *sha); /* SHA256 writes the digest of |len| bytes from |data| to |out| and returns - * |out|. There must be at least |SHA_DIGEST_LENGTH| bytes of space in + * |out|. There must be at least |SHA256_DIGEST_LENGTH| bytes of space in * |out|. */ OPENSSL_EXPORT uint8_t *SHA256(const uint8_t *data, size_t len, uint8_t *out); @@ -179,11 +179,11 @@ OPENSSL_EXPORT int SHA384_Init(SHA512_CTX *sha); OPENSSL_EXPORT int SHA384_Update(SHA512_CTX *sha, const void *data, size_t len); /* SHA384_Final adds the final padding to |sha| and writes the resulting digest - * to |md|, which must have at least |SHA_DIGEST_LENGTH| bytes of space. */ + * to |md|, which must have at least |SHA384_DIGEST_LENGTH| bytes of space. */ OPENSSL_EXPORT int SHA384_Final(uint8_t *md, SHA512_CTX *sha); /* SHA384 writes the digest of |len| bytes from |data| to |out| and returns - * |out|. There must be at least |SHA_DIGEST_LENGTH| bytes of space in + * |out|. There must be at least |SHA384_DIGEST_LENGTH| bytes of space in * |out|. */ OPENSSL_EXPORT uint8_t *SHA384(const uint8_t *data, size_t len, uint8_t *out); @@ -207,11 +207,11 @@ OPENSSL_EXPORT int SHA512_Init(SHA512_CTX *sha); OPENSSL_EXPORT int SHA512_Update(SHA512_CTX *sha, const void *data, size_t len); /* SHA512_Final adds the final padding to |sha| and writes the resulting digest - * to |md|, which must have at least |SHA_DIGEST_LENGTH| bytes of space. */ + * to |md|, which must have at least |SHA512_DIGEST_LENGTH| bytes of space. */ OPENSSL_EXPORT int SHA512_Final(uint8_t *md, SHA512_CTX *sha); /* SHA512 writes the digest of |len| bytes from |data| to |out| and returns - * |out|. There must be at least |SHA_DIGEST_LENGTH| bytes of space in + * |out|. There must be at least |SHA512_DIGEST_LENGTH| bytes of space in * |out|. */ OPENSSL_EXPORT uint8_t *SHA512(const uint8_t *data, size_t len, uint8_t *out); |