refactor to mautrix 0.17.x; update deps
This commit is contained in:
22
vendor/maunium.net/go/mautrix/crypto/goolm/base64.go
generated
vendored
Normal file
22
vendor/maunium.net/go/mautrix/crypto/goolm/base64.go
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
package goolm
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
)
|
||||
|
||||
// Deprecated: base64.RawStdEncoding should be used directly
|
||||
func Base64Decode(input []byte) ([]byte, error) {
|
||||
decoded := make([]byte, base64.RawStdEncoding.DecodedLen(len(input)))
|
||||
writtenBytes, err := base64.RawStdEncoding.Decode(decoded, input)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return decoded[:writtenBytes], nil
|
||||
}
|
||||
|
||||
// Deprecated: base64.RawStdEncoding should be used directly
|
||||
func Base64Encode(input []byte) []byte {
|
||||
encoded := make([]byte, base64.RawStdEncoding.EncodedLen(len(input)))
|
||||
base64.RawStdEncoding.Encode(encoded, input)
|
||||
return encoded
|
||||
}
|
||||
Reference in New Issue
Block a user