Class PKCS11UTIL


  • public class PKCS11UTIL
    extends Object
    Author:
    Stiftung SIC
    • Constructor Detail

      • PKCS11UTIL

        public PKCS11UTIL()
    • Method Detail

      • utf8Encoder

        public static byte[] utf8Encoder​(char[] charArray)
                                  throws UnsupportedEncodingException
        encodes 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 UnsupportedEncodingException
        decodes 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