utils.com.unbound.common.STR Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unbound-java-provider Show documentation
Show all versions of unbound-java-provider Show documentation
This is a collection of JAVA libraries that implement Unbound cryptographic classes for JAVA provider, PKCS11 wrapper, cryptoki, and advapi
package com.unbound.common;
import java.nio.charset.StandardCharsets;
public final class STR
{
public static byte[] utf8(String in)
{
return in.getBytes(StandardCharsets.UTF_8);
}
public static String utf8(byte[] in)
{
return new String(in, StandardCharsets.UTF_8);
}
public static boolean nullOrEmpty(String in) { return in==null || in.isEmpty(); }
}