24 lines
480 B
Go
24 lines
480 B
Go
package doubleratchet
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestKey_String(t *testing.T) {
|
|
// Arrange.
|
|
k := Key{
|
|
0xeb, 0x8, 0x10, 0x7c, 0x33, 0x54, 0x0, 0x20,
|
|
0xe9, 0x4f, 0x6c, 0x84, 0xe4, 0x39, 0x50, 0x5a,
|
|
0x2f, 0x60, 0xbe, 0x81, 0xa, 0x78, 0x8b, 0xeb,
|
|
0x1e, 0x2c, 0x9, 0x8d, 0x4b, 0x4d, 0xc1, 0x40,
|
|
}
|
|
|
|
// Act.
|
|
hex := k.String()
|
|
|
|
// Assert.
|
|
require.Equal(t, "eb08107c33540020e94f6c84e439505a2f60be810a788beb1e2c098d4b4dc140", hex)
|
|
}
|