1
0
Fork 0

GSM: Make the au key work on string and byte array

This commit is contained in:
Holger Hans Peter Freyther 2010-12-11 12:51:47 +01:00
parent b1d6f361b6
commit 6f8c0a7fff
2 changed files with 17 additions and 1 deletions

View File

@ -113,7 +113,7 @@ classes.'>
]
auKey [
^ phoneConfig auKey.
^ phoneConfig auKeyByteArray.
]
imsi [

View File

@ -141,4 +141,20 @@ Object subclass: PhoneConfig [
auKey: anAuKey [
auKey := anAuKey.
]
auKeyByteArray [
^ auKey isString
ifTrue: [
| array |
array := OrderedCollection new.
1 to: auKey size by: 2 do: [:each |
array add: (Number readFrom:
(auKey copyFrom: each to: each + 1) readStream
radix: 16)
].
array asByteArray.
]
ifFalse: [auKey].
]
]