That fuck shit the fascists are using
at master 32 lines 604 B view raw
1package org.tm.archive.crypto; 2 3 4import androidx.annotation.NonNull; 5 6import org.signal.core.util.Hex; 7 8import java.io.IOException; 9 10public class DatabaseSecret { 11 12 private final byte[] key; 13 private final String encoded; 14 15 public DatabaseSecret(@NonNull byte[] key) { 16 this.key = key; 17 this.encoded = Hex.toStringCondensed(key); 18 } 19 20 public DatabaseSecret(@NonNull String encoded) throws IOException { 21 this.key = Hex.fromStringCondensed(encoded); 22 this.encoded = encoded; 23 } 24 25 public String asString() { 26 return encoded; 27 } 28 29 public byte[] asBytes() { 30 return key; 31 } 32}