Tag: 哈希服务

在Android上生成Azure SAS令牌

尝试生成Azure SAS令牌以便能够使用Service Bus REST Api。 找到此链接: http://blog.simontimms.com/2015/01/30/sending-message-to-azure-service-bus-using-rest/ 如何在Android上实现相同的目标? 我目前的尝试看起来像这样: private String generateSasToken(String uri, String keyName, String key){ String ret = “”; long tokenExpirationTime = (System.currentTimeMillis() / 1000) + (10 * 365 * 24 * 60 * 60); try { String stringToSign = new URL(uri).toString() + “\n” + tokenExpirationTime; SecretKey secretKey = null; byte[] keyBytes = […]