public static byte[] decodeSingleDesc(byte[] src, int prefixPadding, int suffixPadding)
        throws CorruptEncodingException
    {
        try {
            int length = src.length - suffixPadding - prefixPadding;
            if (length == 0) {
                return EMPTY_BYTE_ARRAY;
            }
            byte[] dst = new byte[length];
            while (--length >= 0) {
                dst[length] = (byte) (~src[prefixPadding + length]);
            }
            return dst;
        } catch (IndexOutOfBoundsException e) {
            throw new CorruptEncodingException(null, e);
        }
    }
public static byte [ ] decodeSingleDesc ( byte [ ] src , int prefixPadding , int suffixPadding ) throws CorruptEncodingException { try { int length = src . length - suffixPadding - prefixPadding ; if ( length == 0 ) { return EMPTY_BYTE_ARRAY ; } byte [ ] dst = new byte [ length ] ; while ( -- length >= 0 ) { dst [ length ] = ( byte ) ( ~ src [ prefixPadding + length ] ) ; } return dst ; } catch ( IndexOutOfBoundsException e ) { throw new CorruptEncodingException ( null , e ) ; } }
Decodes the given byte array which was encoded by {@link
KeyEncoder#encodeSingleDesc}. Always returns a new byte array instance.

@param prefixPadding amount of extra bytes to skip from start of encoded byte array
@param suffixPadding amount of extra bytes to skip at end of encoded byte array