1
// Copyright 2016 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
7
"github.com/juju/errors"
8
"gopkg.in/juju/charm.v6-unstable/resource"
11
// DeserializeFingerprint converts the serialized fingerprint back into
12
// a Fingerprint. "zero" values are treated appropriately.
13
func DeserializeFingerprint(fpSum []byte) (resource.Fingerprint, error) {
14
var fp resource.Fingerprint
17
fp, err = resource.NewFingerprint(fpSum)
19
return fp, errors.Trace(err)