Class KeyUtil


  • public class KeyUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static io.token.security.SecretKey toSecretKey​(java.lang.String privateKey, java.lang.String publicKey, java.lang.String type)
      Converts plain text keys to a SecretKey.
      static io.token.security.keystore.SecretKeyPair toSecretKeyPair​(java.lang.String privateKey, java.lang.String publicKey, java.lang.String type)
      Converts plain text keys to a SecretKeyPair.
      static io.token.security.keystore.TrustedKey toTrustedKey​(java.lang.String publicKey, java.lang.String type)
      Converts plain text keys to a TrustedKey.
      • Methods inherited from class java.lang.Object

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

      • KeyUtil

        public KeyUtil()
    • Method Detail

      • toSecretKey

        public static io.token.security.SecretKey toSecretKey​(java.lang.String privateKey,
                                                              java.lang.String publicKey,
                                                              java.lang.String type)
        Converts plain text keys to a SecretKey.
        Parameters:
        privateKey - the private key
        publicKey - the public key
        type - the type
        Returns:
        the secret key
      • toSecretKeyPair

        public static io.token.security.keystore.SecretKeyPair toSecretKeyPair​(java.lang.String privateKey,
                                                                               java.lang.String publicKey,
                                                                               java.lang.String type)
        Converts plain text keys to a SecretKeyPair.
        Parameters:
        privateKey - the private key
        publicKey - the public key
        type - the type
        Returns:
        the secret key pair
      • toTrustedKey

        public static io.token.security.keystore.TrustedKey toTrustedKey​(java.lang.String publicKey,
                                                                         java.lang.String type)
        Converts plain text keys to a TrustedKey.
        Parameters:
        publicKey - the public key
        type - the type
        Returns:
        the trusted key