Class PKCS11UTIL


  • public class PKCS11UTIL
    extends java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PKCS11UTIL

        public PKCS11UTIL()
    • Method Detail

      • utf8Encoder

        public static byte[] utf8Encoder​(char[] charArray)
                                  throws java.io.UnsupportedEncodingException
        encodes the given charArray as UTF8 encoded byte array.
        Parameters:
        charArray - char array to be encoded
        Returns:
        UTF8 encoded byte array
        Throws:
        java.io.UnsupportedEncodingException - if UTF8 encoding is not supported
      • utf8Decoder

        public static char[] utf8Decoder​(byte[] byteArray)
                                  throws java.io.UnsupportedEncodingException
        decodes the given UTF8 Encoding to a char array.
        Parameters:
        byteArray - the UTF8 encoding
        Returns:
        the char array
        Throws:
        java.io.UnsupportedEncodingException - if UTF8 encoding is not supported