Skip to content

Commit 7980915

Browse files
rupy1014claude
andcommitted
fix: Xcode 16 빌드 오류 수정 - Data.bytes 모호성 해결
- Generator.swift에서 secret.bytes를 Array(secret)로 변경 - counterMessage.bytes를 Array(counterMessage)로 변경 - CryptoSwift와 Foundation 간 Data extension 충돌 해결 - 버전 4.4.7로 업데이트 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f01b954 commit 7980915

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.gitignore.swp

-12 KB
Binary file not shown.

BootpayUI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'BootpayUI'
11-
s.version = '4.4.6'
11+
s.version = '4.4.7'
1212
s.summary = 'Bootpay에서 지원하는 공식 SwiftUI 및 생체인증 결제 라이브러리 입니다. ios 14 이상부터 사용가능합니다.'
1313

1414
# This description is used to generate tags and improve search results.

BootpayUI/Classes/bio/swiftOTP/Generator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ internal class Generator {
4747
/// - returns: One time password string, nil if error
4848
func generateOTP(secret: Data, algorithm: OTPAlgorithm = .sha1, counter: UInt64, digits: Int = 6) -> String? {
4949
// Get byte array of secret key
50-
let key = secret.bytes
50+
let key = Array(secret)
5151

5252
// HMAC message data from counter as big endian
5353
let counterMessage = counter.bigEndian.data
5454

5555
// HMAC hash counter data with secret key
56-
guard let hmac = try? HMAC(key: key, variant: algorithm.hmacVariant).authenticate(counterMessage.bytes) else { return nil }
56+
guard let hmac = try? HMAC(key: key, variant: algorithm.hmacVariant).authenticate(Array(counterMessage)) else { return nil }
5757

5858
// Get last 4 bits of hash as offset
5959
let offset = Int((hmac.last ?? 0x00) & 0x0f)

0 commit comments

Comments
 (0)