// Path: src/main/java/io/github/novacrypto/base58/DecodeTarget.java
// public interface DecodeTarget {
//     DecodeWriter getWriterForLength(int len);
// }
// 
// Path: src/main/java/io/github/novacrypto/base58/DecodeWriter.java
// public interface DecodeWriter {
//     void append(byte b);
// }


import io.github.novacrypto.base58.DecodeWriter;
import io.github.novacrypto.base58.DecodeTarget;
/*
 *  Base58 library, a Java implementation of Base58 encode/decode
 *  Copyright (C) 2017-2019 Alan Evans, NovaCrypto
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 *  Original source: https://github.com/NovaCrypto/Base58
 *  You can contact the authors via github issues.
 */

package io.github.novacrypto;


final class InsecureByteArrayTarget implements DecodeTarget {
    private int idx = 0;
    private byte[] bytes;

    @Override
// Path: src/main/java/io/github/novacrypto/base58/DecodeTarget.java
// public interface DecodeTarget {
//     DecodeWriter getWriterForLength(int len);
// }
// 
// Path: src/main/java/io/github/novacrypto/base58/DecodeWriter.java
// public interface DecodeWriter {
//     void append(byte b);
// }


// Path: src/test/java/io/github/novacrypto/InsecureByteArrayTarget.java
import io.github.novacrypto.base58.DecodeWriter;
import io.github.novacrypto.base58.DecodeTarget;

/*
 *  Base58 library, a Java implementation of Base58 encode/decode
 *  Copyright (C) 2017-2019 Alan Evans, NovaCrypto
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 *  Original source: https://github.com/NovaCrypto/Base58
 *  You can contact the authors via github issues.
 */

package io.github.novacrypto;


final class InsecureByteArrayTarget implements DecodeTarget {
    private int idx = 0;
    private byte[] bytes;

    @Override
    public DecodeWriter getWriterForLength(final int len) {