Skip to content

Can't compile Encrypter.java #1

@kenleach2

Description

@kenleach2

First, let me state that I am a novice when it comes to coding in Java and I have rarely used tools such as Maven. I downloaded the Encrypter.java code, standalone, and attempted to compile it but received the following:

Encrypter.java:74: error: cannot find symbol
bos.writeBytes("Salted__".getBytes(StandardCharsets.US_ASCII));
^
symbol: method writeBytes(byte[])
location: variable bos of type ByteArrayOutputStream
Encrypter.java:75: error: cannot find symbol
bos.writeBytes(salt);
^
symbol: method writeBytes(byte[])
location: variable bos of type ByteArrayOutputStream
Encrypter.java:76: error: cannot find symbol
bos.writeBytes(cipher.doFinal(clearText.getBytes(StandardCharsets.UTF_8)));
^
symbol: method writeBytes(byte[])
location: variable bos of type ByteArrayOutputStream
3 errors

I assume this has to be a missing library for the writeBytes method and was wondering if you could tell me which library is missing and from where the library could be obtained. I did attempt to download the complete repo and run mvn. However, due to strict security, my server cannot use HTTP inbound or outbound, which caused the mvn command to fail.

Any assistance would be greatly appreciated.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions