-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #255 from tangem/IOS-3059_seed
IOS-3059 Seed generation
- Loading branch information
Showing
45 changed files
with
4,514 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
TangemSdk/TangemSdk/Common/Extensions/HexConvertible.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// HexConvertible.swift | ||
// TangemSdk | ||
// | ||
// Created by Alexander Osokin on 09.03.2023. | ||
// Copyright © 2023 Tangem AG. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
// Convert hex data to Integer | ||
public protocol HexConvertible { | ||
init?(hexData: Data) | ||
} | ||
|
||
public extension HexConvertible where Self: FixedWidthInteger { | ||
init?(hexData: Data) { | ||
guard let intValue = Self(hexData.hexString, radix: 16) else { | ||
return nil | ||
} | ||
|
||
self = intValue | ||
} | ||
} | ||
|
||
extension Int: HexConvertible {} | ||
extension UInt64: HexConvertible {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
TangemSdk/TangemSdk/Common/HDWallet/BIP32/ExtendedPublicKey.swift
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.