Generation

generate functionWed, 29 Mar 2023

generar api key y api secret en HmacSHA256 y cifrarlas en java

public String generateApiKeyAndCipher(String apiKey, String apiSecret) { String apiKeyAndSecret = apiKey + "-" + apiSecret; String cipherApiKeyAndSecret = null; try { cipherApiKeyAndSecret = CipherUtil.encrypt(CipherUtil.ENCRYPTION_KEY, apiKeyAndSecret); } catch (Exception e) { e.printStackTrace(); } return cipherApiKeyAndSecret; }

Questions about programming?Chat with your personal AI assistant