Cipher.swift 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Cipher.swift
  2. // This file is part of KeePass.swift
  3. //
  4. // Copyright © 2021 Maxime Epain. All rights reserved.
  5. //
  6. // KeePass.swift is free software: you can redistribute it and/or modify
  7. // it under the terms of the GNU General Public License as published by
  8. // the Free Software Foundation, either version 3 of the License, or
  9. // (at your option) any later version.
  10. //
  11. // KeePass.swift is distributed in the hope that it will be useful,
  12. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. // GNU General Public License for more details.
  15. //
  16. // You should have received a copy of the GNU General Public License
  17. // along with KeePass.swift. If not, see <https://www.gnu.org/licenses/>.
  18. import Crypto
  19. import Foundation
  20. extension AESCipher {
  21. static let UUID = Foundation.UUID(uuid: (0x31, 0xC1, 0xF2, 0xE6, 0xBF, 0x71, 0x43, 0x50,
  22. 0xBE, 0x58, 0x05, 0x21, 0x6A, 0xFC, 0x5A, 0xFF))
  23. }
  24. extension ChaCha20 {
  25. static let UUID = Foundation.UUID(uuid: (0xD6, 0x03, 0x8A, 0x2B, 0x8B, 0x6F, 0x4C, 0xB5,
  26. 0xA5, 0x24, 0x33, 0x9A, 0x31, 0xDB, 0xB5, 0x9A))
  27. }
  28. extension Twofish {
  29. static let UUID = Foundation.UUID(uuid: (0xAD, 0x68, 0xF2, 0x9F, 0x57, 0x6F, 0x4B, 0xB9,
  30. 0xA3, 0x6A, 0xD4, 0x7A, 0xF9, 0x65, 0x34, 0x6C))
  31. }