Java
Java
Example: SecureString.HashVal method
Demonstrates theHashVal method.
Chilkat Java Downloads
import com.chilkatsoft.*;
public class ChilkatExample {
static {
try {
System.loadLibrary("chilkat");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String argv[])
{
boolean success = false;
CkSecureString str = new CkSecureString();
str.put_MaintainHash("sha256");
str.Append("Hello World");
String encodedHash = str.hashVal("base64");
System.out.println(encodedHash);
}
}