public class Util extends Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static String |
bytes_to_hex(byte[] b)
Changes bytes to hex.
|
static okhttp3.CertificatePinner |
createPinner(String apiHost,
String[] caCerts)
Create a certificate pinner for the specified CA certificates.
|
static byte[] |
hash(String algorithm,
String message)
Create hash byte array of message.
|
static byte[] |
hmac(String algorithm,
byte[] keyBytes,
byte[] textBytes)
Creates a hmac of textBytes.
|
static String |
join(Object[] s,
String joiner)
Join elements from s together to make a string.
|
public static byte[] hmac(String algorithm, byte[] keyBytes, byte[] textBytes) throws NoSuchAlgorithmException, InvalidKeyException
algorithm - The algorithm used to create the hmackeyBytes - The key used to initialize the hmactextBytes - The text in bytes used to create the hmacNoSuchAlgorithmException - For invalid algorithmsInvalidKeyException - For invalid keyspublic static String bytes_to_hex(byte[] b)
b - Byte array to be changed to a hex stringpublic static String join(Object[] s, String joiner)
s - An object that will be joined to make a stringjoiner - A string used to join the elements of s togetherpublic static okhttp3.CertificatePinner createPinner(String apiHost, String[] caCerts)
apiHost - the host for pinningcaCerts - the certificates to pin toCopyright © 2025. All rights reserved.