diff options
Diffstat (limited to 'azalea-crypto/src')
| -rw-r--r-- | azalea-crypto/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/azalea-crypto/src/lib.rs b/azalea-crypto/src/lib.rs index 30362e5d..484031ec 100644 --- a/azalea-crypto/src/lib.rs +++ b/azalea-crypto/src/lib.rs @@ -29,6 +29,7 @@ pub fn hex_digest(digest: &[u8]) -> String { // and libraries. It works by treating the sha1 output bytes as one large // integer in two's complement and then printing the integer in base 16, // placing a minus sign if the interpreted number is negative. + num_bigint::BigInt::from_signed_bytes_be(digest).to_str_radix(16) } |
