Skip navigation links

Oracle Communications Services Gatekeeper Java API Reference
6.0

E55513-02


oracle.ocsg.oauth2.util
Class OAuthUtil

java.lang.Object
  extended byoracle.ocsg.oauth2.util.OAuthUtil

All Implemented Interfaces:
Serializable

public class OAuthUtil
extends Object
implements Serializable
See Also:
Serialized Form

Constructor Summary
OAuthUtil()
           

 

Method Summary
static String bytes2Hex(byte[] bts)
          Convert byte array to string.
static byte[] digestPassword(String password)
           
static String generateUUID()
          Generate UUID.
static String join(Collection s, String delimiter)
          Join collection of String.
static String mapToString(Map map)
          encode a map into query string
static String sha1(String source)
          Generate SHA-256 hash of a given string.
static String sha256(String source)
          Generate SHA-256 hash of a given string.
static Map string2Map(String str)
          parse a query string into map.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

OAuthUtil

public OAuthUtil()

Method Detail

bytes2Hex

public static String bytes2Hex(byte[] bts)
Convert byte array to string.
Parameters:
bts - byte array.
Returns:
hex encoded string.

digestPassword

public static byte[] digestPassword(String password)
                             throws Exception
Throws:
Exception

generateUUID

public static String generateUUID()
Generate UUID.
Returns:
UUID in string

join

public static String join(Collection s,
                          String delimiter)
Join collection of String.
Parameters:
s - the strings.
delimiter - delimiter
Returns:
the joined string.

mapToString

public static String mapToString(Map map)
encode a map into query string
Parameters:
map - the map
Returns:
string in http querystring format, e.g. a=1&b=2

sha1

public static String sha1(String source)
Generate SHA-256 hash of a given string.
Parameters:
source - given string.
Returns:
SHA-256 hash.

sha256

public static String sha256(String source)
Generate SHA-256 hash of a given string.
Parameters:
source - given string.
Returns:
SHA-256 hash.

string2Map

public static Map string2Map(String str)
parse a query string into map.
Parameters:
str - string in http querystring format, e.g. a=1&b=2
Returns:
a map

Skip navigation links

Oracle Communications Services Gatekeeper Java API Reference
6.0

E55513-02


Copyright © 2008, 2015, Oracle and/or its affiliates. All rights reserved.