### Question:
B58 { public byte[] findPrefix(int payLoadLength, String desiredPrefix) { int totalLength = payLoadLength + 4; double chars = Math.log(Math.pow(256, totalLength)) / Math.log(58); int requiredChars = (int) Math.ceil(chars + 0.2D); int charPos = (mAlphabet.length / 2) - 1; char padding = mAlphabet[(charPos)]; String template = desiredPrefix + repeat(requiredChars, padding); byte[] decoded = decode(template); return copyOfRange(decoded, 0, decoded.length - totalLength); } B58(String alphabet); byte[] findPrefix(int payLoadLength, String desiredPrefix); String encodeToStringChecked(byte[] input, int version); String encodeToStringChecked(byte[] input, byte[] version); byte[] encodeToBytesChecked(byte[] input, int version); byte[] encodeToBytesChecked(byte[] input, byte[] version); String encodeToString(byte[] input); byte[] encodeToBytes(byte[] input); byte[] decode(String input); BigInteger decodeToBigInteger(String input); byte[] decodeChecked(String input, int version); Decoded decodeMulti(String input,
                               int expectedLength,
                               byte[]... possibleVersions);  }### Answer:
@Test public void testFindsEdPrefix() throws Exception { String prefix = "sEd"; byte[] versionBytes = b58.findPrefix(16, prefix); testStability(16, prefix, versionBytes); assertEncodesTo("01E14B", versionBytes); }
@Test public void testFindsecp256k1Prefix() throws Exception { String prefix = "secp256k1"; byte[] versionBytes = b58.findPrefix(16, prefix); testStability(16, prefix, versionBytes); assertEncodesTo("13984B20F2BD93", versionBytes); }