CryptUtils.java revision b87033953be26b0dc7dead8febd499b666a54126
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: CryptUtils.java,v 1.1 2008/11/22 02:41:19 ak138937 Exp $
*
*/
/*
* Portions Copyrighted [2011] [ForgeRock AS]
*/
public class CryptUtils {
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
private static int decodeBase64(final char[] c, char[] p) {
int i = len;
int px = -1;
int cmpr = 0;
short numeq = 0;
while (i >= 0 && c[--i] == '=') {
++numeq;
}
if (numeq != 0) {
}
for (i = 0; i < loop; ++i) {
if (cmpr == -1) {
p[++px] = '\0';
return px;
}
if (i % 4 == 3) {
}
}
if (cmpr == -1) {
p[0] = '\0';
return 0;
}
if (cmpr == -1) {
p[0] = '\0';
return 0;
}
if (numeq == 2) {
}
if(numeq == 1) {
if (cmpr == -1) {
p[0] = '\0';
return 0;
}
}
}
p[++px] = '\0';
return px;
}
public static int decryptBase64(
final char[] encryptBase,
char[] base64DecBuffer,
final char[] key
) {
char[] buffer = new char[7];
int outlen = 0;
int decodeLen = 0;
if (decodeLen > 0) {
// Decrpypt password will be atleast smaller than the base64 encrypt
return 0;
}
return 1;
}
private static class RC5Ctx {
private int nr;
private int[] xk;
}
int[] pk;
int A, B, keylen;
pk_len++;
}
for (int i = 1; i < xk_len; i++) {
}
} else {
}
A = B = 0;
for (int i = 0; i < num_steps; i++) {
rc = (A + B) & 31;
}
for (int i = 0; i < keylen; i++) {
pk[i] = 0;
}
}
int rc;
int blocks;
int d_index;
int d0;
int d1;
d_index = 0;
for (int i = 0; i < blocks; i++) {
}
/* copy back 4 byte quantities to data array... */
d_index += 8;
}
}
private int ROTL32(int x, int c) {
return (((x) << (c)) | ((x) >>> (32 - (c))));
}
private int ROTR32(int x, int c) {
return (((x) >>> (c)) | ((x) << (32 - (c))));
}
}
}