com.quartzdesk.api.common.security
Class SecurityUtils

java.lang.Object
  extended by com.quartzdesk.api.common.security.SecurityUtils

public class SecurityUtils
extends Object

Version:
$Id:$
Author:
Jan Moravec

Constructor Summary
SecurityUtils()
           
 
Method Summary
static SecretKey symmetricKeyFromBASE64(String base64, String keyAlg)
          Converts the specified secret key represented as a BASE64 string into a secret key.
static String symmetricKeyToBASE64(Key key)
          Converts the specified key into the BASE64 format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityUtils

public SecurityUtils()
Method Detail

symmetricKeyToBASE64

public static String symmetricKeyToBASE64(Key key)
Converts the specified key into the BASE64 format.

Parameters:
key - a key.
Returns:
the BASE64 key representation.

symmetricKeyFromBASE64

public static SecretKey symmetricKeyFromBASE64(String base64,
                                               String keyAlg)
Converts the specified secret key represented as a BASE64 string into a secret key.

Parameters:
base64 - a BASE64 encoded secret key.
keyAlg - the key algorithm.
Returns:
the secret key.
Throws:
SecurityException - if the specified string is not BASE64 encoded.


Copyright © 2013–2017 QuartzDesk.com. All rights reserved.