tdutils: sha512
GitOrigin-RevId: c6875d59d840abff58cd4da5abd59517ce00ab02
This commit is contained in:
parent
a92860a046
commit
40b314f60d
@ -340,6 +340,12 @@ void sha256(Slice data, MutableSlice output) {
|
||||
CHECK(result == output.ubegin());
|
||||
}
|
||||
|
||||
void sha512(Slice data, MutableSlice output) {
|
||||
CHECK(output.size() >= 64);
|
||||
auto result = SHA512(data.ubegin(), data.size(), output.ubegin());
|
||||
CHECK(result == output.ubegin());
|
||||
}
|
||||
|
||||
struct Sha256StateImpl {
|
||||
SHA256_CTX ctx;
|
||||
};
|
||||
|
@ -48,6 +48,8 @@ void sha1(Slice data, unsigned char output[20]);
|
||||
|
||||
void sha256(Slice data, MutableSlice output);
|
||||
|
||||
void sha512(Slice data, MutableSlice output);
|
||||
|
||||
struct Sha256StateImpl;
|
||||
|
||||
struct Sha256State {
|
||||
|
Loading…
Reference in New Issue
Block a user