Update vendor for Azure dependencies

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
This commit is contained in:
Stephen Augustus
2019-08-15 18:01:44 -04:00
parent db855f9ba0
commit 14e4b5f8db
183 changed files with 23704 additions and 4938 deletions

View File

@@ -17,6 +17,7 @@ package storage
import (
"bytes"
"crypto/hmac"
"crypto/rand"
"crypto/sha256"
"encoding/base64"
"encoding/xml"
@@ -29,6 +30,8 @@ import (
"strconv"
"strings"
"time"
uuid "github.com/satori/go.uuid"
)
var (
@@ -242,3 +245,16 @@ func getMetadataFromHeaders(header http.Header) map[string]string {
return metadata
}
// newUUID returns a new uuid using RFC 4122 algorithm.
func newUUID() (uuid.UUID, error) {
u := [16]byte{}
// Set all bits to randomly (or pseudo-randomly) chosen values.
_, err := rand.Read(u[:])
if err != nil {
return uuid.UUID{}, err
}
u[8] = (u[8]&(0xff>>2) | (0x02 << 6)) // u.setVariant(ReservedRFC4122)
u[6] = (u[6] & 0xF) | (uuid.V4 << 4) // u.setVersion(V4)
return uuid.FromBytes(u[:])
}