Fix compilation for gomobile iOS (#17)

* Move signature verification to errors

* Move cleartext messages to ClearTextMessage struct

* Fix documentation
This commit is contained in:
wussler 2019-07-02 07:36:02 -07:00 committed by GitHub
parent 552ce9554f
commit 9195b9ae92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 311 additions and 296 deletions

View file

@ -38,7 +38,7 @@ func TestAttachmentSetKey(t *testing.T) {
assert.Exactly(t, testSymmetricKey, symmetricKey)
}
func TestAttachnentEncryptDecrypt(t *testing.T) {
func TestAttachmentEncryptDecrypt(t *testing.T) {
var testAttachmentCleartext = "cc,\ndille."
var message = NewPlainMessage([]byte(testAttachmentCleartext))
@ -55,7 +55,7 @@ func TestAttachnentEncryptDecrypt(t *testing.T) {
assert.Exactly(t, message, redecData)
}
func TestAttachnentEncrypt(t *testing.T) {
func TestAttachmentEncrypt(t *testing.T) {
var testAttachmentCleartext = "cc,\ndille."
var message = NewPlainMessage([]byte(testAttachmentCleartext))
@ -66,7 +66,7 @@ func TestAttachnentEncrypt(t *testing.T) {
pgpMessage := NewPGPMessage(append(encSplit.GetKeyPacket(), encSplit.GetDataPacket()...))
redecData, _, err := testPrivateKeyRing.Decrypt(pgpMessage, nil, 0)
redecData, err := testPrivateKeyRing.Decrypt(pgpMessage, nil, 0)
if err != nil {
t.Fatal("Expected no error while decrypting attachment, got:", err)
}
@ -74,7 +74,7 @@ func TestAttachnentEncrypt(t *testing.T) {
assert.Exactly(t, message, redecData)
}
func TestAttachnentDecrypt(t *testing.T) {
func TestAttachmentDecrypt(t *testing.T) {
var testAttachmentCleartext = "cc,\ndille."
var message = NewPlainMessage([]byte(testAttachmentCleartext))