SRSIMDHelpers.h 616 B

12345678910111213141516171819
  1. //
  2. // Copyright (c) 2016-present, Facebook, Inc.
  3. // All rights reserved.
  4. //
  5. // This source code is licensed under the BSD-style license found in the
  6. // LICENSE file in the root directory of this source tree. An additional grant
  7. // of patent rights can be found in the PATENTS file in the same directory.
  8. //
  9. #import <Foundation/Foundation.h>
  10. /**
  11. Unmask bytes using XOR via SIMD.
  12. @param bytes The bytes to unmask.
  13. @param length The number of bytes to unmask.
  14. @param maskKey The mask to XOR with MUST be of length sizeof(uint32_t).
  15. */
  16. void SRMaskBytesSIMD(uint8_t *bytes, size_t length, uint8_t *maskKey);