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 arepeatedValue
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 ingetCString
(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 arepeatedValue
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 ingetCString
(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 arepeatedValue
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 ingetCString
(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 arepeatedValue
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 ingetCString
(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 arepeatedValue
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 ingetCString
(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 arepeatedValue
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 ingetCString
(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?