diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-29 20:21:42 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-29 20:34:22 +0100 |
commit | 373483321d9b7d923cb91e328a019f979137f8c4 (patch) | |
tree | 38ae7d141a15a8262861c6985b6b87eb2ee6df40 /A3A8.st | |
parent | e7c0a159471e7f4ac2e300defa77b70095cc9f77 (diff) |
GSM48: Handle the AuthRequest and respond with a AuthResponse
Diffstat (limited to 'A3A8.st')
-rw-r--r-- | A3A8.st | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -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. +] |