GSM: Make the au key work on string and byte array
This commit is contained in:
parent
b1d6f361b6
commit
6f8c0a7fff
|
@ -113,7 +113,7 @@ classes.'>
|
|||
]
|
||||
|
||||
auKey [
|
||||
^ phoneConfig auKey.
|
||||
^ phoneConfig auKeyByteArray.
|
||||
]
|
||||
|
||||
imsi [
|
||||
|
|
16
TestPhone.st
16
TestPhone.st
|
@ -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].
|
||||
]
|
||||
]
|
||||
|
|
Reference in New Issue