Human-readable sharable hashes

This commit is contained in:
idk
2019-08-14 00:46:35 -04:00
parent a812fbd784
commit eff15e73ba
7 changed files with 66 additions and 24 deletions

View File

@ -30,11 +30,11 @@ func (h *Hasher) Friendly(input string) (string, error) {
if err != nil {
return "", err
}
return strings.Join(slice, "."), nil
return strings.Join(slice, " "), nil
}
func (h *Hasher) Unfriendly(input string) (string, error) {
slice := strings.Split(input, ".")
slice := strings.Split(input, " ")
hash, err := h.hasher.Dehumanize(slice)
if err != nil {
return "", err