section-1.swift 413 B

123456789101112131415161718192021222324
  1. // Playground - noun: a place where people can play
  2. import Foundation
  3. reverse(1..<4)
  4. var arr:[UInt8] = [0x06];
  5. let repeat = Repeat(count: 5, repeatedValue: 0)
  6. for a in repeat {
  7. arr = arr + [Byte(a)]
  8. }
  9. arr + [Byte](count: 5, repeatedValue: 0)
  10. arr[0..<3]
  11. var key:[Byte] = [1,2,3,4,5,6,7,8,9,0]
  12. var opad = [Byte](count: 64, repeatedValue: 0x5c)
  13. opad.map({ (val:Byte) -> (Byte) in
  14. return val ^ 56
  15. })