@@ -46,7 +46,7 @@ func (this BIP0340) CreatePrivateKeyWithPassword(password string, opts ...string
4646// 生成私钥 pem 数据
4747func (this BIP0340 ) CreatePKCS1PrivateKey () BIP0340 {
4848 if this .privateKey == nil {
49- err := errors .New ("privateKey empty." )
49+ err := errors .New ("go-cryptobin/bip0340: privateKey empty." )
5050 return this .AppendError (err )
5151 }
5252
@@ -68,7 +68,7 @@ func (this BIP0340) CreatePKCS1PrivateKey() BIP0340 {
6868// 生成私钥带密码 pem 数据
6969func (this BIP0340 ) CreatePKCS1PrivateKeyWithPassword (password string , opts ... string ) BIP0340 {
7070 if this .privateKey == nil {
71- err := errors .New ("privateKey empty." )
71+ err := errors .New ("go-cryptobin/bip0340: privateKey empty." )
7272 return this .AppendError (err )
7373 }
7474
@@ -80,7 +80,7 @@ func (this BIP0340) CreatePKCS1PrivateKeyWithPassword(password string, opts ...s
8080 // 加密方式
8181 cipher := pkcs1 .GetPEMCipher (opt )
8282 if cipher == nil {
83- err := errors .New ("PEMCipher not exists." )
83+ err := errors .New ("go-cryptobin/bip0340: PEMCipher not exists." )
8484 return this .AppendError (err )
8585 }
8686
@@ -112,7 +112,7 @@ func (this BIP0340) CreatePKCS1PrivateKeyWithPassword(password string, opts ...s
112112// 生成 PKCS8 私钥 pem 数据
113113func (this BIP0340 ) CreatePKCS8PrivateKey () BIP0340 {
114114 if this .privateKey == nil {
115- err := errors .New ("privateKey empty." )
115+ err := errors .New ("go-cryptobin/bip0340: privateKey empty." )
116116 return this .AppendError (err )
117117 }
118118
@@ -135,7 +135,7 @@ func (this BIP0340) CreatePKCS8PrivateKey() BIP0340 {
135135// CreatePKCS8PrivateKeyWithPassword("123", "AES256CBC", "SHA256")
136136func (this BIP0340 ) CreatePKCS8PrivateKeyWithPassword (password string , opts ... any ) BIP0340 {
137137 if this .privateKey == nil {
138- err := errors .New ("privateKey empty." )
138+ err := errors .New ("go-cryptobin/bip0340: privateKey empty." )
139139 return this .AppendError (err )
140140 }
141141
@@ -172,7 +172,7 @@ func (this BIP0340) CreatePKCS8PrivateKeyWithPassword(password string, opts ...a
172172// 生成公钥 pem 数据
173173func (this BIP0340 ) CreatePublicKey () BIP0340 {
174174 if this .publicKey == nil {
175- err := errors .New ("publicKey empty." )
175+ err := errors .New ("go-cryptobin/bip0340: publicKey empty." )
176176 return this .AppendError (err )
177177 }
178178
0 commit comments