refactor to mautrix 0.17.x; update deps
This commit is contained in:
17
vendor/maunium.net/go/mautrix/crypto/goolm/cipher/main.go
generated
vendored
Normal file
17
vendor/maunium.net/go/mautrix/crypto/goolm/cipher/main.go
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// cipher provides the methods and structs to do encryptions for olm/megolm.
|
||||
package cipher
|
||||
|
||||
// Cipher defines a valid cipher.
|
||||
type Cipher interface {
|
||||
// Encrypt encrypts the plaintext.
|
||||
Encrypt(key, plaintext []byte) (ciphertext []byte, err error)
|
||||
|
||||
// Decrypt decrypts the ciphertext.
|
||||
Decrypt(key, ciphertext []byte) (plaintext []byte, err error)
|
||||
|
||||
//MAC returns the MAC of the message calculated with the key.
|
||||
MAC(key, message []byte) ([]byte, error)
|
||||
|
||||
//Verify checks the MAC of the message calculated with the key against the givenMAC.
|
||||
Verify(key, message, givenMAC []byte) (bool, error)
|
||||
}
|
||||
Reference in New Issue
Block a user