C
clusardi2k
When I include the below package (link 1) in a project, I get the following error message:
C:\...\src\org\apache\commons\codec\binary\Base64.java:50: error: cannot find symbol
public class Base64 extends BaseNCodec {
symbol: class BaseNCode
The code in (1) came from (2). I'd like to use both of these.
What am I doing wrong here! What should I be doing. (Do I need a dot jar for this.)
How do I encrypt strings. Also, do you have a simple example project.
Is there a better alternative to this package for encryption. What should I be considering
Many Thanks,
(Link 1)http://svn.apache.org/viewvc/common.../commons/codec/binary/Base64.java?view=markup
(Link 2) http://zenu.wordpress.com/2011/09/21/aes-128bit-cross-platform-java-and-c-encryption-compatibility/
FYI: Below is the complete output of the build:
C:\...\src\org\apache\commons\codec\binary\Base64.java:50: error: cannot find symbol
public class Base64 extends BaseNCodec {
symbol: class BaseNCodec
C:\...\src\org\apache\commons\codec\binary\Base64.java:321: error: cannot find symbol
void encode(byte[] in, int inPos, int inAvail, Context context) {
symbol: class Context
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:411: error: cannot find symbol
void decode(byte[] in, int inPos, int inAvail, Context context) {
symbol: class Context
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:188: error: cannot find symbol
this(MIME_CHUNK_SIZE, CHUNK_SEPARATOR, urlSafe);
symbol: variable MIME_CHUNK_SIZE
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:271: error: cannot find symbol
if (containsAlphabetOrPad(lineSeparator)) {
symbol: method containsAlphabetOrPad(byte[])
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:272: error: cannot find symbol
String sep = StringUtils.newStringUtf8(lineSeparator);
symbol: variable StringUtils
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:329: error: cannot find symbol
if (0 == context.modulus && lineLength == 0) {
symbol: variable lineLength
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:340: error: cannot find symbol
context.buffer[context.pos++] = PAD;
symbol: variable PAD
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:341: error: cannot find symbol
context.buffer[context.pos++] = PAD;
symbol: variable PAD
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:351: error: cannot find symbol
context.buffer[context.pos++] = PAD;
symbol: variable PAD
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:357: error: cannot find symbol
if (lineLength > 0 && context.currentLinePos > 0) {
symbol: variable lineLength
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:376: error: cannot find symbol
if (lineLength > 0 && lineLength <= context.currentLinePos) {
symbol: variable lineLength
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:376: error: cannot find symbol
if (lineLength > 0 && lineLength <= context.currentLinePos) {
symbol: variable lineLength
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:320: error: method does not override or implement a method from a supertype
@Override
C:\...\src\org\apache\commons\codec\binary\Base64.java:421: error: cannot find symbol
if (b == PAD) {
symbol: variable PAD
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:432: error: cannot find symbol
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea >> 16) & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:433: error: cannot find symbol
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea >> 8) & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:434: error: cannot find symbol
context.buffer[context.pos++] = (byte) (context.ibitWorkArea & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:454: error: illegal start of type
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea) & MASK_8BITS);
C:\...\src\org\apache\commons\codec\binary\Base64.java:454: error: cannot find symbol
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea) & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:458: error: cannot find symbol
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea >> 8) & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:459: error: illegal start of type
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea) & MASK_8BITS);
C:\...\src\org\apache\commons\codec\binary\Base64.java:459: error: cannot find symbol
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea) & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:410: error: method does not override or implement a method from a supertype
@Override
C:\...\src\org\apache\commons\codec\binary\Base64.java:489: error: cannot find symbol
return octet == PAD_DEFAULT || (octet >= 0 && octet < DECODE_TABLE.length && DECODE_TABLE[octet] != -1);
symbol: variable PAD_DEFAULT
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:503: error: cannot find symbol
return isBase64(StringUtils.getBytesUtf8(base64));
symbol: variable StringUtils
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:518: error: cannot find symbol
if (!isBase64(arrayOctet) && !isWhiteSpace(arrayOctet)) {
symbol: method isWhiteSpace(byte)
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:548: error: cannot find symbol
return StringUtils.newStringUtf8(encodeBase64(binaryData, false));
symbol: variable StringUtils
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:574: error: cannot find symbol
return StringUtils.newStringUtf8(encodeBase64(binaryData, false, true));
symbol: variable StringUtils
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:645: error: cannot find symbol
long len = b64.getEncodedLength(binaryData);
symbol: method getEncodedLength(byte[])
location: variable b64 of type Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:653: error: method encode in class Base64 cannot be applied to given types;
return b64.encode(binaryData);
required: byte[],int,int,Context
found: byte[]
reason: actual and formal argument lists differ in length
C:\...\src\org\apache\commons\codec\binary\Base64.java:665: error: method decode in class Base64 cannot be applied to given types;
return new Base64().decode(base64String);
required: byte[],int,int,Context
found: String
reason: actual and formal argument lists differ in length
C:\...\src\org\apache\commons\codec\binary\Base64.java:676: error: method decode in class Base64 cannot be applied to given types;
return new Base64().decode(base64Data);
required: byte[],int,int,Context
found: byte[]
reason: actual and formal argument lists differ in length
C:\...\src\org\apache\commons\codec\binary\Base64.java:749: error: method does not override or implement a method from a supertype
@Override
Note: C:\...\src\...\Login_Screen.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
34 errors
C:\...\nbproject\build-impl.xml:606: The following error occurred while executing this line:
C:\...\nbproject\build-impl.xml:247: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 5 seconds)
C:\...\src\org\apache\commons\codec\binary\Base64.java:50: error: cannot find symbol
public class Base64 extends BaseNCodec {
symbol: class BaseNCode
The code in (1) came from (2). I'd like to use both of these.
What am I doing wrong here! What should I be doing. (Do I need a dot jar for this.)
How do I encrypt strings. Also, do you have a simple example project.
Is there a better alternative to this package for encryption. What should I be considering
Many Thanks,
(Link 1)http://svn.apache.org/viewvc/common.../commons/codec/binary/Base64.java?view=markup
(Link 2) http://zenu.wordpress.com/2011/09/21/aes-128bit-cross-platform-java-and-c-encryption-compatibility/
FYI: Below is the complete output of the build:
C:\...\src\org\apache\commons\codec\binary\Base64.java:50: error: cannot find symbol
public class Base64 extends BaseNCodec {
symbol: class BaseNCodec
C:\...\src\org\apache\commons\codec\binary\Base64.java:321: error: cannot find symbol
void encode(byte[] in, int inPos, int inAvail, Context context) {
symbol: class Context
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:411: error: cannot find symbol
void decode(byte[] in, int inPos, int inAvail, Context context) {
symbol: class Context
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:188: error: cannot find symbol
this(MIME_CHUNK_SIZE, CHUNK_SEPARATOR, urlSafe);
symbol: variable MIME_CHUNK_SIZE
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:271: error: cannot find symbol
if (containsAlphabetOrPad(lineSeparator)) {
symbol: method containsAlphabetOrPad(byte[])
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:272: error: cannot find symbol
String sep = StringUtils.newStringUtf8(lineSeparator);
symbol: variable StringUtils
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:329: error: cannot find symbol
if (0 == context.modulus && lineLength == 0) {
symbol: variable lineLength
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:340: error: cannot find symbol
context.buffer[context.pos++] = PAD;
symbol: variable PAD
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:341: error: cannot find symbol
context.buffer[context.pos++] = PAD;
symbol: variable PAD
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:351: error: cannot find symbol
context.buffer[context.pos++] = PAD;
symbol: variable PAD
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:357: error: cannot find symbol
if (lineLength > 0 && context.currentLinePos > 0) {
symbol: variable lineLength
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:376: error: cannot find symbol
if (lineLength > 0 && lineLength <= context.currentLinePos) {
symbol: variable lineLength
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:376: error: cannot find symbol
if (lineLength > 0 && lineLength <= context.currentLinePos) {
symbol: variable lineLength
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:320: error: method does not override or implement a method from a supertype
@Override
C:\...\src\org\apache\commons\codec\binary\Base64.java:421: error: cannot find symbol
if (b == PAD) {
symbol: variable PAD
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:432: error: cannot find symbol
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea >> 16) & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:433: error: cannot find symbol
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea >> 8) & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:434: error: cannot find symbol
context.buffer[context.pos++] = (byte) (context.ibitWorkArea & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:454: error: illegal start of type
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea) & MASK_8BITS);
C:\...\src\org\apache\commons\codec\binary\Base64.java:454: error: cannot find symbol
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea) & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:458: error: cannot find symbol
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea >> 8) & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:459: error: illegal start of type
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea) & MASK_8BITS);
C:\...\src\org\apache\commons\codec\binary\Base64.java:459: error: cannot find symbol
context.buffer[context.pos++] = (byte) ((context.ibitWorkArea) & MASK_8BITS);
symbol: variable MASK_8BITS
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:410: error: method does not override or implement a method from a supertype
@Override
C:\...\src\org\apache\commons\codec\binary\Base64.java:489: error: cannot find symbol
return octet == PAD_DEFAULT || (octet >= 0 && octet < DECODE_TABLE.length && DECODE_TABLE[octet] != -1);
symbol: variable PAD_DEFAULT
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:503: error: cannot find symbol
return isBase64(StringUtils.getBytesUtf8(base64));
symbol: variable StringUtils
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:518: error: cannot find symbol
if (!isBase64(arrayOctet) && !isWhiteSpace(arrayOctet)) {
symbol: method isWhiteSpace(byte)
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:548: error: cannot find symbol
return StringUtils.newStringUtf8(encodeBase64(binaryData, false));
symbol: variable StringUtils
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:574: error: cannot find symbol
return StringUtils.newStringUtf8(encodeBase64(binaryData, false, true));
symbol: variable StringUtils
location: class Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:645: error: cannot find symbol
long len = b64.getEncodedLength(binaryData);
symbol: method getEncodedLength(byte[])
location: variable b64 of type Base64
C:\...\src\org\apache\commons\codec\binary\Base64.java:653: error: method encode in class Base64 cannot be applied to given types;
return b64.encode(binaryData);
required: byte[],int,int,Context
found: byte[]
reason: actual and formal argument lists differ in length
C:\...\src\org\apache\commons\codec\binary\Base64.java:665: error: method decode in class Base64 cannot be applied to given types;
return new Base64().decode(base64String);
required: byte[],int,int,Context
found: String
reason: actual and formal argument lists differ in length
C:\...\src\org\apache\commons\codec\binary\Base64.java:676: error: method decode in class Base64 cannot be applied to given types;
return new Base64().decode(base64Data);
required: byte[],int,int,Context
found: byte[]
reason: actual and formal argument lists differ in length
C:\...\src\org\apache\commons\codec\binary\Base64.java:749: error: method does not override or implement a method from a supertype
@Override
Note: C:\...\src\...\Login_Screen.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
34 errors
C:\...\nbproject\build-impl.xml:606: The following error occurred while executing this line:
C:\...\nbproject\build-impl.xml:247: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 5 seconds)