feat: 实现联通话费余量只读面板

This commit is contained in:
Nixevol
2026-10-16 16:12:52 +08:00
commit a67e19d333
18 changed files with 2401 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package unicom
import (
"math/big"
"testing"
)
func TestEncryptPasswordPacksLittleEndian(t *testing.T) {
modulus := "10001"
exponent := "11"
got, err := encryptPassword(exponent, modulus, "A")
if err != nil {
t.Fatal(err)
}
m := big.NewInt(65537)
e := big.NewInt(17)
block := big.NewInt(65)
want := hexBlock(new(big.Int).Exp(block, e, m))
if got != want {
t.Fatalf("got %s want %s", got, want)
}
}