| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // This file was auto-generated by the vanadium vdl tool. |
| // Source: errors.vdl |
| |
| package bcrypter |
| |
| import ( |
| // VDL system imports |
| "v.io/v23/context" |
| "v.io/v23/i18n" |
| "v.io/v23/verror" |
| ) |
| |
| var ( |
| ErrInternal = verror.Register("v.io/x/ref/lib/security/bcrypter.Internal", verror.NoRetry, "{1:}{2:} internal error: {3}") |
| ErrInvalidArg = verror.Register("v.io/x/ref/lib/security/bcrypter.InvalidArg", verror.NoRetry, "{1:}{2:} invalid argument: {3}") |
| ErrInvalidScheme = verror.Register("v.io/x/ref/lib/security/bcrypter.InvalidScheme", verror.NoRetry, "{1:}{2:} invalid cryptographic scheme: {3}, supported schemes: {4}") |
| ErrPrivateKeyNotFound = verror.Register("v.io/x/ref/lib/security/bcrypter.PrivateKeyNotFound", verror.NoRetry, "{1:}{2:} no private key found for decrypting ciphertext") |
| ) |
| |
| func init() { |
| i18n.Cat().SetWithBase(i18n.LangID("en"), i18n.MsgID(ErrInternal.ID), "{1:}{2:} internal error: {3}") |
| i18n.Cat().SetWithBase(i18n.LangID("en"), i18n.MsgID(ErrInvalidArg.ID), "{1:}{2:} invalid argument: {3}") |
| i18n.Cat().SetWithBase(i18n.LangID("en"), i18n.MsgID(ErrInvalidScheme.ID), "{1:}{2:} invalid cryptographic scheme: {3}, supported schemes: {4}") |
| i18n.Cat().SetWithBase(i18n.LangID("en"), i18n.MsgID(ErrPrivateKeyNotFound.ID), "{1:}{2:} no private key found for decrypting ciphertext") |
| } |
| |
| // NewErrInternal returns an error with the ErrInternal ID. |
| func NewErrInternal(ctx *context.T, err error) error { |
| return verror.New(ErrInternal, ctx, err) |
| } |
| |
| // NewErrInvalidArg returns an error with the ErrInvalidArg ID. |
| func NewErrInvalidArg(ctx *context.T, err error) error { |
| return verror.New(ErrInvalidArg, ctx, err) |
| } |
| |
| // NewErrInvalidScheme returns an error with the ErrInvalidScheme ID. |
| func NewErrInvalidScheme(ctx *context.T, gotScheme int32, supportedSchemes []int32) error { |
| return verror.New(ErrInvalidScheme, ctx, gotScheme, supportedSchemes) |
| } |
| |
| // NewErrPrivateKeyNotFound returns an error with the ErrPrivateKeyNotFound ID. |
| func NewErrPrivateKeyNotFound(ctx *context.T) error { |
| return verror.New(ErrPrivateKeyNotFound, ctx) |
| } |