We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sample is outdated, the working code to generate the SAS token is
static private string CreateSharedAccessToken(string id, string key, DateTime then) { // Important: seconds must be 0 for this to work DateTime expiry = new DateTime(then.Year, then.Month, then.Day, then.Hour, then.Minute, 0, DateTimeKind.Utc); using (HMACSHA512 hmac = new HMACSHA512(Encoding.UTF8.GetBytes(key))) { string dataToSign = id + "\n" + expiry.ToString("O", CultureInfo.InvariantCulture); byte[] hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(dataToSign)); string signature = Convert.ToBase64String(hash); return $"{id}&{expiry:yyyyMMddHHmm}&{signature}"; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Sample is outdated, the working code to generate the SAS token is
The text was updated successfully, but these errors were encountered: