]> Cypherpunks repositories - keks.git/commitdiff
Ability to use IP address format
authorSergey Matveev <stargrave@stargrave.org>
Tue, 15 Apr 2025 07:44:40 +0000 (10:44 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 15 Apr 2025 07:44:40 +0000 (10:44 +0300)
tcl/keks.tcl
tcl/test-vector.tcl

index f645b9b9e7e79f8c52f650678e85bb67cf8bf2908bfaf3857d5fb85a3c133586..b0255e99d9f09565dd305662c53ab835f5ab22b3120fc34886e7398169281eed 100755 (executable)
@@ -28,6 +28,7 @@ proc char {v} {
     add [binary format c $v]
 }
 
+# Just add a raw value.
 proc RAW {v} {
     upvar buf buf
     add $v
@@ -54,7 +55,7 @@ proc TRUE {} {
 }
 
 proc HEXLET {v} {
-    set v [binary decode hex [string map {- ""} $v]]
+    set v [binary decode hex [string map {- "" : ""} $v]]
     if {[string length $v] != 16} {
         error "bad len"
     }
index 3dbcf08f5808b3453227d81430a8a74f8e5bfabff78dbc2c70fc07fe9ab34993..f63b061636f52547a9b7c7dfc1fdc3f2128f65278ebf24f78b0e84f7991a916c 100644 (file)
@@ -67,7 +67,7 @@ MAP {
         {TAI64 1234567890 456789 123456789}
     }}
     uuid {HEXLET 0e875e3f-d385-49eb-87b4-be42d641c367}
-    ip {HEXLET 20010db8-85a3-08d3-1319-8a2e03707348}
+    ip {HEXLET 2001:0db8:85a3:08d3:1319:8a2e:0370:7348}
 }
 
 puts [binary encode hex $buf]