Initial commit
This commit is contained in:
39
Emoney Info/Classes/smartCard/CommonConstants.swift
Executable file
39
Emoney Info/Classes/smartCard/CommonConstants.swift
Executable file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright 2018-2020 TON DEV SOLUTIONS LTD.
|
||||
*
|
||||
* Licensed under the SOFTWARE EVALUATION License (the "License"); you may not use
|
||||
* this file except in compliance with the License.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific TON DEV software governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
|
||||
func debugLog(
|
||||
_ items: Any...,
|
||||
separator: String = " ",
|
||||
terminator: String = "\n"
|
||||
) {
|
||||
#if DEBUG
|
||||
let output = items.map { String(describing: $0) }.joined(separator: separator)
|
||||
Swift.print(output, terminator: terminator)
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
Here there are some contants related to all APDU commands
|
||||
*/
|
||||
public class CommonConstants {
|
||||
static let CLA_SELECT: UInt8 = 0x00
|
||||
static let INS_SELECT : UInt8 = 0xA4
|
||||
static let SELECT_P1 : UInt8 = 0x04
|
||||
static let SELECT_P2 : UInt8 = 0x00
|
||||
static let LE_NO_RESPONSE_DATA = -1 // Use this LE if you do not wait any response data from card (except of status word)
|
||||
static let LE_GET_ALL_RESPONSE_DATA = 256 // This is standard 0x00 value of LE. Use this LE if you want to take all response bytes from applet that it produced
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user