public class Utils extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
Utils.RecordRunnable |
| 构造器和说明 |
|---|
Utils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static InputStream |
getCipherInputStream(InputStream in,
String keySeed,
int keySize)
decrypt input stream
|
static OutputStream |
getCipherOutputStream(OutputStream out,
String keySeed,
int keySize)
encrypt output stream
|
static Key |
getKey(String keySeed,
int keySize)
get SecretKey via key seed( password )
|
static String |
getStackFromException(Exception e) |
static void |
noUseGzip(com.ksyun.ks3.service.request.Ks3WebServiceRequest request) |
static void |
recordCostTime(org.slf4j.Logger logger,
String message,
Runnable runnable) |
static <T> T |
recordCostTime(org.slf4j.Logger logger,
String message,
Utils.RecordRunnable runnable) |
static RuntimeException |
rethrowRuntimeEx(Exception e,
String message) |
public static OutputStream getCipherOutputStream(OutputStream out, String keySeed, int keySize) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException
out - keySeed - keySize - NoSuchPaddingExceptionNoSuchAlgorithmExceptionInvalidKeyExceptionpublic static InputStream getCipherInputStream(InputStream in, String keySeed, int keySize) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException
in - keySeed - keySize - NoSuchPaddingExceptionNoSuchAlgorithmExceptionInvalidKeyExceptionpublic static Key getKey(String keySeed, int keySize) throws NoSuchAlgorithmException, InvalidKeyException
keySeed - keySize - NoSuchAlgorithmExceptionInvalidKeyExceptionpublic static void noUseGzip(com.ksyun.ks3.service.request.Ks3WebServiceRequest request)
public static RuntimeException rethrowRuntimeEx(Exception e, String message)
public static <T> T recordCostTime(org.slf4j.Logger logger,
String message,
Utils.RecordRunnable runnable)
throws Exception
ExceptionCopyright © 2022. All rights reserved.