/** * Base32-decode the current stream. * * @return an iterator over the decoded bytes */ public ByteIterator base32Decode() { return base32Decode(Base32Alphabet.STANDARD, true); }
/** * Base32-decode the current stream. * * @param alphabet the alphabet to use * @return an iterator over the decoded bytes */ public ByteIterator base32Decode(final Base32Alphabet alphabet) { return base32Decode(alphabet, true); }
private String nameFor(Path path) { String fileName = path.toString(); fileName = fileName.substring(0, fileName.length() - 4); // remove ".xml" if (encoded) { CodePointIterator it = CodePointIterator.ofString(fileName); it.delimitedBy('-').skipAll(); it.next(); // skip '-' fileName = it.base32Decode(Base32Alphabet.STANDARD, false) .asUtf8String().drainToString(); } return fileName; }
private byte[] decodeUsingAlphabet(String payload) { if (picketBoxCompatibility) { return picketBoxBase64Decode(payload); } else { ByteIterator byteIterator = isBase64(alphabet) ? CodePointIterator.ofString(payload).base64Decode(getAlphabet64(alphabet), usePadding) : CodePointIterator.ofString(payload).base32Decode(getAlphabet32(alphabet)); return byteIterator.drain(); } }
: CodePointIterator.ofString(encodedIV).base32Decode(getAlphabet32(alphabet), false); ivSpec = new IvParameterSpec(byteIterator.drain());
} else if (algName != null) { if (parameters != null) { byte[] encodedParameters = CodePointIterator.ofString(parameters).base32Decode(Base32Alphabet.LOWERCASE, false).drain(); final AlgorithmParameters algorithmParameters = AlgorithmParameters.getInstance(algName); algorithmParameters.init(encodedParameters);
/** * Base32-decode the current stream. * * @return an iterator over the decoded bytes */ public ByteIterator base32Decode() { return base32Decode(Base32Alphabet.STANDARD, true); }
/** * Base32-decode the current stream. * * @param alphabet the alphabet to use * @return an iterator over the decoded bytes */ public ByteIterator base32Decode(final Base32Alphabet alphabet) { return base32Decode(alphabet, true); }
/** * Base32-decode the current stream. * * @return an iterator over the decoded bytes */ public ByteIterator base32Decode() { return base32Decode(Base32Alphabet.STANDARD, true); }
/** * Base32-decode the current stream. * * @param alphabet the alphabet to use * @return an iterator over the decoded bytes */ public ByteIterator base32Decode(final Base32Alphabet alphabet) { return base32Decode(alphabet, true); }
private String nameFor(Path path) { String fileName = path.toString(); fileName = fileName.substring(0, fileName.length() - 4); // remove ".xml" if (encoded) { CodePointIterator it = CodePointIterator.ofString(fileName); it.delimitedBy('-').skipAll(); it.next(); // skip '-' fileName = it.base32Decode(Base32Alphabet.STANDARD, false) .asUtf8String().drainToString(); } return fileName; }
private String nameFor(Path path) { String fileName = path.toString(); fileName = fileName.substring(0, fileName.length() - 4); // remove ".xml" if (encoded) { CodePointIterator it = CodePointIterator.ofString(fileName); it.delimitedBy('-').skipAll(); it.next(); // skip '-' fileName = it.base32Decode(Base32Alphabet.STANDARD, false) .asUtf8String().drainToString(); } return fileName; }
private String nameFor(Path path) { String fileName = path.toString(); fileName = fileName.substring(0, fileName.length() - 4); // remove ".xml" if (encoded) { CodePointIterator it = CodePointIterator.ofString(fileName); it.delimitedBy('-').skipAll(); it.next(); // skip '-' fileName = it.base32Decode(Base32Alphabet.STANDARD, false) .asUtf8String().drainToString(); } return fileName; }
private byte[] decodeUsingAlphabet(String payload) { if (picketBoxCompatibility) { return picketBoxBase64Decode(payload); } else { ByteIterator byteIterator = isBase64(alphabet) ? CodePointIterator.ofString(payload).base64Decode(getAlphabet64(alphabet), usePadding) : CodePointIterator.ofString(payload).base32Decode(getAlphabet32(alphabet)); return byteIterator.drain(); } }
private byte[] decodeUsingAlphabet(String payload) { if (picketBoxCompatibility) { return picketBoxBase64Decode(payload); } else { ByteIterator byteIterator = isBase64(alphabet) ? CodePointIterator.ofString(payload).base64Decode(getAlphabet64(alphabet), usePadding) : CodePointIterator.ofString(payload).base32Decode(getAlphabet32(alphabet)); return byteIterator.drain(); } }
private byte[] decodeUsingAlphabet(String payload) { if (picketBoxCompatibility) { return picketBoxBase64Decode(payload); } else { ByteIterator byteIterator = isBase64(alphabet) ? CodePointIterator.ofString(payload).base64Decode(getAlphabet64(alphabet), usePadding) : CodePointIterator.ofString(payload).base32Decode(getAlphabet32(alphabet)); return byteIterator.drain(); } }
: CodePointIterator.ofString(encodedIV).base32Decode(getAlphabet32(alphabet), false); ivSpec = new IvParameterSpec(byteIterator.drain());
: CodePointIterator.ofString(encodedIV).base32Decode(getAlphabet32(alphabet), false); ivSpec = new IvParameterSpec(byteIterator.drain());
: CodePointIterator.ofString(encodedIV).base32Decode(getAlphabet32(alphabet), false); ivSpec = new IvParameterSpec(byteIterator.drain());
} else if (algName != null) { if (parameters != null) { byte[] encodedParameters = CodePointIterator.ofString(parameters).base32Decode(Base32Alphabet.LOWERCASE, false).drain(); final AlgorithmParameters algorithmParameters = AlgorithmParameters.getInstance(algName); algorithmParameters.init(encodedParameters);