x/crypto/openpgp/packet: fix message for errors resulting from an unknown cipher.
Change-Id: Icebde4a001b220a64aa4bcddd206484feed5ad79 Reviewed-on: https://go-review.googlesource.com/15155 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
@@ -85,7 +85,7 @@ func (ske *SymmetricKeyEncrypted) Decrypt(passphrase []byte) ([]byte, CipherFunc
|
||||
c.XORKeyStream(plaintextKey, ske.encryptedKey)
|
||||
cipherFunc := CipherFunction(plaintextKey[0])
|
||||
if cipherFunc.blockSize() == 0 {
|
||||
return nil, ske.CipherFunc, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(ske.CipherFunc)))
|
||||
return nil, ske.CipherFunc, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc)))
|
||||
}
|
||||
plaintextKey = plaintextKey[1:]
|
||||
if l := len(plaintextKey); l == 0 || l%cipherFunc.blockSize() != 0 {
|
||||
|
||||
Reference in New Issue
Block a user