Data
public extension Data
-
Convert data to hex string
Declaration
Swift
var hexValue: String { get }
-
Mutate data with adding zero padding to the left until fulfil the block size
Declaration
Swift
mutating func padZeroLeft(blockSize: Int) -> Data
Parameters
blockSize
The size of block.
Return Value
self in
Data
type. -
Mutate data with adding zero padding to the right until fulfil the block size
Declaration
Swift
mutating func padZeroRight(blockSize: Int) -> Data
Parameters
blockSize
The size of block.
Return Value
self in
Data
type. -
Add zero padding to the left until fulfil the block size
Declaration
Swift
func paddingZeroLeft(blockSize: Int) -> Data
Parameters
blockSize
The size of block.
Return Value
A new
Data
type with padding zero. -
Add zero padding to the right until fulfil the block size
Declaration
Swift
func paddingZeroRight(blockSize: Int) -> Data
Parameters
blockSize
The size of block.
Return Value
A new
Data
type with padding zero.