aboutsummaryrefslogtreecommitdiffstats
path: root/A3A8.st
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-11-29 20:21:42 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-11-29 20:34:22 +0100
commit373483321d9b7d923cb91e328a019f979137f8c4 (patch)
tree38ae7d141a15a8262861c6985b6b87eb2ee6df40 /A3A8.st
parente7c0a159471e7f4ac2e300defa77b70095cc9f77 (diff)
GSM48: Handle the AuthRequest and respond with a AuthResponse
Diffstat (limited to 'A3A8.st')
-rw-r--r--A3A8.st31
1 files changed, 31 insertions, 0 deletions
diff --git a/A3A8.st b/A3A8.st
new file mode 100644
index 0000000..5d71c18
--- /dev/null
+++ b/A3A8.st
@@ -0,0 +1,31 @@
+Object subclass: A3A8 [
+ A3A8 class >> initialize [
+ DLD addLibrary: 'liba3a8.so'
+ ]
+
+ A3A8 class >> COMP128_v3: aKI rand: aRand [
+ | str |
+
+ aKI size = 16 ifFalse: [
+ ^ self error: 'KI needs to be 16 bytes'
+ ].
+
+ aRand size = 16 ifFalse: [
+ ^ self error: 'RAND needs to be 16 bytes'
+ ].
+
+
+ str := ByteArray new: 16.
+ self int_COMP128_v3: aKI rand: aRand res: (CObject new storage: str).
+
+ ^ str
+ ]
+
+ A3A8 class >> int_COMP128_v3: aKI rand: aRand res: aRes [
+ <cCall: 'COMP128_3' returning: #void args: #(#string #string #cObject)>
+ ]
+]
+
+Eval [
+ A3A8 initialize.
+]