github.com/readium/readium-lcp-server@v0.0.0-20240101192032-6e95190e99f1/license/user_key.go (about) 1 // Copyright 2017 European Digital Reading Lab. All rights reserved. 2 // Licensed to the Readium Foundation under one or more contributor license agreements. 3 // Use of this source code is governed by a BSD-style license 4 // that can be found in the LICENSE file exposed on Github (readium) in the project repository. 5 6 package license 7 8 import ( 9 "log" 10 11 "github.com/readium/readium-lcp-server/config" 12 ) 13 14 var LCP_PRODUCTION_LIB = false 15 16 // GenerateUserKey function prepares the user key 17 func GenerateUserKey(key UserKey) []byte { 18 if config.Config.Profile != "basic" { 19 log.Println("Incompatible LCP profile") 20 return nil 21 } 22 return key.Value 23 }