add more tests

This commit is contained in:
kevin
2020-09-30 15:36:13 +08:00
parent 2703493541
commit 0ce654968d
3 changed files with 84 additions and 0 deletions

View File

@@ -71,3 +71,9 @@ func TestDiffieHellmanMiddleManAttack(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, string(src), string(decryptedSrc))
}
func TestKeyBytes(t *testing.T) {
key, err := GenerateKey()
assert.Nil(t, err)
assert.True(t, len(key.Bytes()) > 0)
}