summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2023-03-13 21:53:38 +0000
committerEllie Huxtable <ellie@elliehuxtable.com>2023-03-13 21:56:23 +0000
commit687dda19c052b30dececd9a016b05e9b9d17a7ea (patch)
treedd89a4d2164c5e556984f36237d4b8ef2f222aa8
parent1cb41cb1ab2dc3f82fa741c860280d1f87ac4872 (diff)
remove sneaky hasherellie/uuid7
-rw-r--r--Cargo.lock2
-rw-r--r--atuin-common/Cargo.toml2
-rw-r--r--atuin-common/src/utils.rs11
3 files changed, 0 insertions, 15 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 17c325ad..e3ffdf5b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -159,9 +159,7 @@ name = "atuin-common"
version = "13.0.1"
dependencies = [
"chrono",
- "hex",
"serde",
- "sha2",
"uuid",
]
diff --git a/atuin-common/Cargo.toml b/atuin-common/Cargo.toml
index 34698fe7..17ade596 100644
--- a/atuin-common/Cargo.toml
+++ b/atuin-common/Cargo.toml
@@ -14,5 +14,3 @@ repository = "https://github.com/ellie/atuin"
chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1.0.145", features = ["derive"] }
uuid = { version = "1.3", features = ["v7"] }
-sha2 = { version = "0.10" }
-hex = { version = "0.4" }
diff --git a/atuin-common/src/utils.rs b/atuin-common/src/utils.rs
index 88cf2ed3..91625a69 100644
--- a/atuin-common/src/utils.rs
+++ b/atuin-common/src/utils.rs
@@ -7,17 +7,6 @@ pub fn uuid_v7() -> String {
Uuid::now_v7().as_simple().to_string()
}
-pub fn hash_str(string: &str) -> String {
- hash_bytes(string.as_bytes())
-}
-
-pub fn hash_bytes(buf: &[u8]) -> String {
- use sha2::{Digest, Sha256};
- let mut hasher = Sha256::new();
- hasher.update(buf);
- hex::encode(hasher.finalize())
-}
-
// TODO: more reliable, more tested
// I don't want to use ProjectDirs, it puts config in awkward places on
// mac. Data too. Seems to be more intended for GUI apps.