Package iaik.pkcs.pkcs11.wrapper
Class PKCS11UTIL
- java.lang.Object
-
- iaik.pkcs.pkcs11.wrapper.PKCS11UTIL
-
public class PKCS11UTIL extends Object
- Author:
- Stiftung SIC
-
-
Constructor Summary
Constructors Constructor Description PKCS11UTIL()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static char[]utf8Decoder(byte[] byteArray)decodes the given UTF8 Encoding to a char array.static byte[]utf8Encoder(char[] charArray)encodes the given charArray as UTF8 encoded byte array.
-
-
-
Method Detail
-
utf8Encoder
public static byte[] utf8Encoder(char[] charArray) throws UnsupportedEncodingExceptionencodes the given charArray as UTF8 encoded byte array.- Parameters:
charArray- char array to be encoded- Returns:
- UTF8 encoded byte array
- Throws:
UnsupportedEncodingException- if UTF8 encoding is not supported
-
utf8Decoder
public static char[] utf8Decoder(byte[] byteArray) throws UnsupportedEncodingExceptiondecodes the given UTF8 Encoding to a char array.- Parameters:
byteArray- the UTF8 encoding- Returns:
- the char array
- Throws:
UnsupportedEncodingException- if UTF8 encoding is not supported
-
-