Skip to main content
Code Review

Return to Question

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
  • I keep a default key as a private struct in the extension so the operation function can be called without arguments for encoding/decoding with a default key.

  • No need to call bzero anymore since we init the buffer with a repeatedValue of 0.

  • In my first pass of this in Swift, I accidentally was passing in the size of the array (pointer) as the maxLength parameter in getCString (Stack Overflow question here here). Is there any way I could make the code clearer so I don't do that in the future?

  • Is it necessary to malloc a buffer? Can I use a Swift [Int8] instead?

  • According to my boss in a passive comment, AES-128 is "known to be compromised." How complex would it be to refactor this code to use AES-256 or (192) bit encryption?

  • I keep a default key as a private struct in the extension so the operation function can be called without arguments for encoding/decoding with a default key.

  • No need to call bzero anymore since we init the buffer with a repeatedValue of 0.

  • In my first pass of this in Swift, I accidentally was passing in the size of the array (pointer) as the maxLength parameter in getCString (Stack Overflow question here). Is there any way I could make the code clearer so I don't do that in the future?

  • Is it necessary to malloc a buffer? Can I use a Swift [Int8] instead?

  • According to my boss in a passive comment, AES-128 is "known to be compromised." How complex would it be to refactor this code to use AES-256 or (192) bit encryption?

  • I keep a default key as a private struct in the extension so the operation function can be called without arguments for encoding/decoding with a default key.

  • No need to call bzero anymore since we init the buffer with a repeatedValue of 0.

  • In my first pass of this in Swift, I accidentally was passing in the size of the array (pointer) as the maxLength parameter in getCString (Stack Overflow question here). Is there any way I could make the code clearer so I don't do that in the future?

  • Is it necessary to malloc a buffer? Can I use a Swift [Int8] instead?

  • According to my boss in a passive comment, AES-128 is "known to be compromised." How complex would it be to refactor this code to use AES-256 or (192) bit encryption?

edited tags
Link
JAL
  • 581
  • 1
  • 11
  • 25
added 45 characters in body
Source Link
JAL
  • 581
  • 1
  • 11
  • 25
  • I keep a default key as a private struct in the extension so the operation function can be called without arguments for encoding/decoding with a default key.

  • No need to call bzero anymore since we init the buffer with a repeatedValue of 0.

  • In my first pass of this in Swift, I accidentally was passing in the size of the array (pointer) as the maxLength parameter in getCString (Stack Overflow question here). Is there any way I could make the code clearer so I don't do that in the future?

  • Is it necessary to malloc a buffer? Can I use a Swift [Int8] instead?

  • According to my boss in a passive comment, AES-128 is known"known to be compromised." How complex would it be to refactor this code to use AES-256 or (192) bit encryption?

  • I keep a default key as a private struct in the extension so the operation function can be called without arguments for encoding/decoding with a default key.

  • No need to call bzero anymore since we init the buffer with a repeatedValue of 0.

  • In my first pass of this in Swift, I accidentally was passing in the size of the array (pointer) as the maxLength parameter in getCString (Stack Overflow question here). Is there any way I could make the code clearer so I don't do that in the future?

  • Is it necessary to malloc a buffer? Can I use a Swift [Int8] instead?

  • AES-128 is known to be compromised. How complex would it be to refactor this code to use AES-256 or (192) bit encryption?

  • I keep a default key as a private struct in the extension so the operation function can be called without arguments for encoding/decoding with a default key.

  • No need to call bzero anymore since we init the buffer with a repeatedValue of 0.

  • In my first pass of this in Swift, I accidentally was passing in the size of the array (pointer) as the maxLength parameter in getCString (Stack Overflow question here). Is there any way I could make the code clearer so I don't do that in the future?

  • Is it necessary to malloc a buffer? Can I use a Swift [Int8] instead?

  • According to my boss in a passive comment, AES-128 is "known to be compromised." How complex would it be to refactor this code to use AES-256 or (192) bit encryption?

Added link to original extension
Source Link
JAL
  • 581
  • 1
  • 11
  • 25
Loading
Source Link
JAL
  • 581
  • 1
  • 11
  • 25
Loading
default

AltStyle によって変換されたページ (->オリジナル) /