public class Sts2Utils extends Object
Constructor and Description |
---|
Sts2Utils() |
Modifier and Type | Method and Description |
---|---|
static String |
aesEncryptCBC(String sSrc,
byte[] sKey) |
static InnerToken |
createInnerToken(Credentials credentials,
SecurityToken2 sts2,
Policy inlinePolicy,
long seconds) |
static byte[] |
encrypt(String data,
String key) |
static String |
generateAccessKeyId(String prefix) |
static String |
generateSecretKey() |
static byte[] |
genMD5Checksum(byte[] content) |
static Statement |
newAllowStatement(List<String> actions,
List<String> resources) |
static Statement |
newDenyStatement(List<String> actions,
List<String> resources) |
public static String aesEncryptCBC(String sSrc, byte[] sKey) throws Exception
Exception
public static InnerToken createInnerToken(Credentials credentials, SecurityToken2 sts2, Policy inlinePolicy, long seconds) throws Exception
Exception
public static byte[] genMD5Checksum(byte[] content) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static Statement newAllowStatement(List<String> actions, List<String> resources)
Copyright © 2022. All rights reserved.