throw new Base64DecodingException("decoding.divisible.four"); if (b1 == -1 || b2 == -1) { throw new Base64DecodingException("decoding.general"); throw new Base64DecodingException("decoding.general"); } else if (!isPad(d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad] if ((b3 & 0x3) != 0) { //last 2 bits should be zero throw new Base64DecodingException("decoding.general"); } else { throw new Base64DecodingException("decoding.general"); throw new Base64DecodingException("decoding.general");
cipherValueBytes = Base64.decode(cipherValue); } catch (Base64DecodingException e) { throw new IllegalArgumentException("Bad base64 encoding in CipherValue element: "+e.getMessage(),e);
throw new Base64DecodingException("decoding.divisible.four"); if (b1 == -1 || b2 == -1 || b3 == -1 || b4 == -1) { throw new Base64DecodingException("decoding.general"); throw new Base64DecodingException("decoding.general"); if (isPad(d3) && isPad(d4)) { //Two PAD e.g. 3c[Pad][Pad] if ((b2 & 0xf) != 0) { //last 4 bits should be zero throw new Base64DecodingException("decoding.general"); throw new Base64DecodingException("decoding.general"); } else { throw new Base64DecodingException("decoding.general");
throw new Base64DecodingException("decoding.general"); if (isPad(d3) && isPad(d4)) { //Two PAD e.g. 3c[Pad][Pad] if ((b2 & 0xf) != 0) { //last 4 bits should be zero throw new Base64DecodingException("decoding.general"); b3 = base64Alphabet[d3]; if ((b3 & 0x3) != 0) { //last 2 bits should be zero throw new Base64DecodingException("decoding.general"); } else { throw new Base64DecodingException("decoding.general");